POST

Get Charge Limit


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Wix calls this method 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.

Endpoint
POST
{DEPLOYMENT-URI}/v1/charge-limit
Body Params
subscriptionIdstringformat GUID

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.


currencystringformat CURRENCY

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.

Response Object
chargeLimitstringformat DECIMAL_VALUEdecimalValue {"gt":"0.00"}

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.

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
curl -X POST \ 'https://provider.example.com/v1/charge-limit' \ -H 'Authorization: <AUTH>' \ -d '{ "data": { "request": { "subscriptionId": "efa6b37d-74c6-44bb-b639-28c4af3957dd", "currency": "USD" }, "metadata": { "requestId": "1680014776.67327419774788218037", "identity": { "identityType": "APP", "appId": "365288ae-38f4-4932-92d5-d45c596c7260" }, "instanceId": "3aa496c3-aa49-4369-84e6-3fa1876f191d" } }, "aud": "6675724b-bf3e-482a-9a00-65616953b570", "iss": "wix.com", "iat": 1680014777, "exp": 1683614777 }'
Response
JSON
{ "chargeLimit": "1000.00" }
Did this help?