Extension Config


To configure and customize your service plugin, you need to provide important details in the plugin.json configuration file.

Note

If you created your service plugin extension with the CLI, required fields are automatically populated for you.

Configuration Params
baseUriSpiBaseUri

Base part of your integration's deployment URI for the Custom Charges SPI. For example "https://provider.example.com", if Wix should call your integration at https://provider.example.com/v1/charge-limit for the Get Charge Limit method.


Was this helpful?
Yes
No

listCharges( )


Important: This is a handler function. Implement it only as part of the service plugin.


Wix calls this method to retrieve a list of charges for a paid instance of your app. This happens when Wix creates an invoice or in case the customer wants to preview how much your app would charge them at the moment.

You must return the charges in the currency that's specified in the request, you aren't allowed to return more than 5 charges, and their sum must be lower than the charge limit.

You may not bill customers for any usage that didn’t occur during the period Wix specifies when retrieving the charges. If Wix discovers that your app has charged customers for usage outside of an invoice's specified period, we may take action such as blocking your app from charging the customer, removing your app from the Wix App Market, revoking your access to the Wix developer program, or pursuing legal action to recover damages caused by overcharging. We understand that mistakes can happen and encourage you to contact the Wix App Market team immediately if you become aware of any overcharging issues so that we can work together to resolve the situation.

Method Declaration
Copy
Method Parameters
payloadListChargesEnvelope
Returns
Return Type:ListChargesResponse | Promise<ListChargesResponse>
Was this helpful?
Yes
No