Search.../
  1. REST
Generate a test token to explore our APIs

Get Charge Limit

Developer Preview

Wix calls this endpoint to retrieve the initial charge limit for a paid instance of your app. This happens every time a customer is upgrading to a paid version of your app.

You can't update the charge limit after you've set an initial value. Customers can increase the limit in their site's dashboard, currently they aren't allowed to decrease it.

Syntax

function GetCharge Limit(subscriptionId: string, currency: string): GetChargeLimit<_wix_premium_customcharges_spi_v1_GetChargeLimitResponse>

Get Charge Limit Parameters

NAME
TYPE
DESCRIPTION
subscriptionId
string

ID of the subscription for which Wix retrieves the charge limit. Equals null in case Wix hasn't created the subscription when retrieving an initial charge limit. To track usage and billing for apps, we recommend to use instanceId instead of the subscriptionId.

currency
string

Supported values: AUD, BRL, CAD, EUR, GBP, ILS, INR, JPY, MXN, PLN, RUB, TRY, USD.

3-letter currency code in ISO-4217 alphabetic format of the charge limit. Wix may add supported currencies in the future.

Returns

Return Type:

object
NAME
TYPE
DESCRIPTION
chargeLimit
string

Retrieved charge limit for the app instance. You can't update the charge limit after you've set an initial value. Site owners can increase the limit in their site's dashboard, currently they aren't allowed to decrease it.

Was this helpful?

Return an app instance's initial charge limit.

The data payload includes the following object as an encoded JWT. Here, we show the request and response objects decoded.

Request

curl

Copy Code
1curl -X POST \
2'https://provider.example.com/v1/charge-limit' \
3-H 'Authorization: <AUTH>' \
4-d '{
5 "data": {
6 "request": {
7 "subscriptionId": "efa6b37d-74c6-44bb-b639-28c4af3957dd",
8 "currency": "USD"
9 },
10 "metadata": {
11 "requestId": "1680014776.67327419774788218037",
12 "identity": {
13 "identityType": "APP",
14 "appId": "365288ae-38f4-4932-92d5-d45c596c7260"
15 },
16 "instanceId": "3aa496c3-aa49-4369-84e6-3fa1876f191d"
17 }
18 },
19 "aud": "6675724b-bf3e-482a-9a00-65616953b570",
20 "iss": "wix.com",
21 "iat": 1680014777,
22 "exp": 1683614777
23}'

Response

json

1{"chargeLimit": "1000.00"}