Add a service plugin (formerly SPI) extension to your app in your app's dashboard to extend the functionality of a Wix site.
With service plugins, your app can:
If you prefer to host your app on Wix, you can add a service plugin extension with the CLI.
Follow these steps to implement a self-managed service plugin with the Wix JavaScript SDK:
Add a service plugin extension to your app in your app's dashboard as follows:
Select an app from the Custom Apps page in your Wix Studio workspace.
Go to the Extensions page, and click + Create Extension.

Filter by tag, or search to find the extension you want to add.
Select the relevant extension and click + Create.
In the JSON editor, configure the parameters by referencing the Documentation section on the right side of the page. For each parameter, add the parameter name and value in the JSON editor.

Click Save.
To implement a self-managed service plugin, retrieve the following credentials from your app's dashboard:
To retrieve your credentials:
Note: If your handler needs to make outbound calls to Wix APIs, you also need the App Secret Key from the same screen. The App Secret Key isn't required to receive and verify inbound SPI calls.
In your app code, import the Wix client and service plugin modules you need, then call createClient() with the AppStrategy auth strategy to create a client that receives and routes inbound SPI calls:
Make sure you:
modules when creating the client.Note: This client handles inbound SPI calls only. If your handler needs to make outbound calls to Wix APIs, create a separate client per request using your App Secret Key and metadata.instanceId from the inbound payload.
Now it's time to add your custom business logic. Do this by calling provideHandlers() and passing it an object containing handler functions for each service plugin functionality you need:
For example, to implement the Shipping Rates service plugin, define the getShippingRates() handler function as follows:
When a site action triggers one of these functions, Wix passes the function a payload object containing the following properties:
request: Details related to the specific service and action.metadata: Information about the context of the request, such as the App Instance ID, site currency, language, and identity of the user who triggered the request.To find the handler functions a service plugin supports, and the precise structure of the request and metadata objects for each handler function, see the reference documentation.
Define a route to handle POST requests from Wix. In your route handler, call wixClient.servicePlugins.process() and pass it the request URL and raw body. This method takes care of the following for you:
provideHandlers() and passes it the request payload.For example, if you are using Express, implement the route as follows:
Here's an example of implementing this code for a shipping rates service plugin:
Last updated: 8 September 2026