POST

Invoice Created 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 creates an invoice that includes charges for an instance of your app.

Endpoint
POST
{DEPLOYMENT-URI}/v1/invoice-created
Body Params
subscriptionIdstringformat GUID

ID of the subscription for which Wix has created an invoice that includes 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.


invoiceIdstring

ID of the created invoice.


lineItemsArray <InvoiceLineItem>maxItems 5

Line items included in the invoice.

Response Object
Returns an empty object.
Get notified when Wix creates an invoice with 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/invoice-created' \ -H 'Authorization: <AUTH>' \ -d '{ "data": { "request": { "subscriptionId": "efa6b37d-74c6-44bb-b639-28c4af3957dd", "currency": "USD", "invoiceId": 43434213, "lineItems": [ { "chargeId": "Some Charge Id 1", "amount": "200.00", "id": "f322c4bf-7edb-42f8-b0c2-162b51d4ad75" }, { "chargeId": "Some Charge Id 2", "amount": "300.00", "id": "4faa44b4-654c-411d-803d-be816e03726e" } ] }, "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?