Important: Some service plugins are in Beta. This means that some aren't yet available to all users, and are subject to change. They also aren't available yet in the SDK.
Service plugins provide a powerful way to expand what your Wix site can do. You can extend and customize using plugins by:
Service plugins let you customize specific parts of flows in apps created by Wix without rebuilding entire features. For example, instead of creating a custom checkout page using the Checkout API, you can use service plugins to inject custom logic at specific points in the existing flow.
Custom shipping providers: When you set up a Wix Store, there are a limited number of payment and shipping rates service providers to choose from. If you want to use a provider not currently on the list, you can create a service plugin that allows you to add more shipping rate providers to your store's checkout flow. This type of service plugin involves integrating with a 3rd-party service provider.
Additional checkout fees: The default eCommerce checkout process doesn't allow you to add additional fees that aren't related to specific line items. You can use a service plugin to add extra fees, like charges for gift wrap or fragile items, to your checkout flow. This type of service plugin involves injecting your own logic into an existing flow in an app created by Wix.
Service plugins fulfill a kind of contract between your code and existing app flows. You, or a 3rd-party service provider, commit to providing data in a certain format, and the app that manages the flow commits to using this data in its flows at specific points.
Each service plugin consists of a set of backend code files that utilize API methods for implementation. Apps created by Wix call the methods automatically at specific points in their flows. The methods receive and return data in a specific format. The returned data is then integrated by the app created by Wix into its flow.
The reference documentation for each method indicates at what point in a flow an app triggers the method. The documentation also outlines the data that must be provided as arguments to the method when it's triggered, and the format of the data that the method must return.
Here's how it works:
For example:
calculateAdditionalFees()
method.You can add any custom logic to calculate the additional fees as long as the method returns your data in the proper structure.
If you connect to a 3rd-party provider using service plugins, you agree to the Wix.com Terms of Use. Wix is not responsible for your use of such a 3rd-party provider, and any liability resulting from such use will be your responsibility.
Without service plugins, if you want to change your out-of-the-box app flow just a little, you might have to rewrite large parts of the flow, such as creating a custom checkout page using the Wix eCommerce Checkout API. This could involve writing many lines of code and creating custom collections.
Because service plugins only affect a small part of an app's flow, service plugin methods require fewer lines of code and less maintenance than when working with APIs. So wherever possible, you want to use service plugin methods.
For more information, read Understanding the difference between service plugins and APIs.
Term | Description |
---|---|
Service plugins (formerly SPIs and custom extensions) | A feature that lets you extend the services provided on a site using code. You can make these plugins by adding your own custom logic into a flow for an app created by Wix, or by adding data received from a 3rd-party service provider into a flow for an app created by Wix. You implement service plugins by adding files to backend code files to a site. These files contain code for your custom logic method calls that trigger at specific points in the flow for the app created by Wix. These custom logic method calls use a type of API that defines a service, but leaves the implementation of that service to service providers. |
Service provider | The entity providing a service, for example, a shipping company. The service is either a custom service or a 3rd-party service. |
Wix user | You, the Wix user or collaborator responsible for developing the code needed for the service plugin. Your code uses your own custom logic or accesses a service provided by a 3rd-party service provider. |
Service | Any additional functionality you add to the site that's not part of the original flow in an app created by Wix. The Wix user codes the interface to the service with the service plugin feature. The Wix user or a 3rd-party can write the service. If a 3rd-party provides the service, the Wix user writes the code for the interface by accessing 3rd-party APIs with wix-fetch, and/or using npm packages. |
App created by Wix | The app created by Wix whose functionality you extend. For example, Wix eCommerce has several Service Plugins available for customizing its flows. |