POST

Charges Rejected Event


Developer Preview

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

Triggered in case Wix doesn't accept the charges you've returned in the List Charges method.

You aren't allowed to charge a site owner more than the charge limit. Wix call List Charges in regular intervals until the sum of all charges is lower than the charge limit. Wix doesn't create an invoice in case the charges aren't accepted.

Endpoint
POST
{DEPLOYMENT-URI}/v1/charges-rejected
Body Params
subscriptionIdstringformat GUID

ID of the subscription for which Wix hasn't accepted your custom charges. 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 charges. Wix may add supported currencies in the future.


chargeIdsArray <string>maxItems 5

IDs of the rejected charges.

Max: 5 charges


chargeLimitstringformat DECIMAL_VALUEdecimalValue {"gt":"0.00"}

Maximum amount that your app may charge the customer per billing cycle.

Min: 0.50


reasonsArray <string>maxItems 20

Information about why Wix has rejected your app's charges.

Max: 20 reasons

Response Object
Returns an empty object.
Get notified when Wix doesn't accept your custom charges.

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/charges-rejected' \ -H 'Authorization: <AUTH>' \ -d '{ "data": { "request": { "subscriptionId": "efa6b37d-74c6-44bb-b639-28c4af3957dd", "currency": "USD", "chargeIds": [ "Some Charge Id 1", "Some Charge Id 2" ], "chargeLimit": "1000.00", "reasons": [ "CHARGE_LIMIT_EXCEEDED" ] }, "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
{}
Did this help?