Add Service Plugin Extensions with the Wix CLI

Service plugin extensions are a set of APIs defined by Wix that you can use to inject custom logic into the existing backend flows of Wix business solutions or to introduce entirely new flows to Wix sites.

You can implement service plugin extensions in your project using the Wix CLI.

Follow the instructions below to:

  1. Create a service plugin extension for your project.
  2. Test your service plugin extension.

Once this task is complete, your project will have a service plugin extension with custom functions that Wix calls during a specific flow.

Before you begin

Step 1 | Create the extension

In the terminal:

  1. Navigate to your project repo.

  2. Run the generate command.

  3. The CLI will display a menu of extensions to generate. Select Service Plugin and hit enter to continue.

  4. The CLI will prompt you to select a service plugin from a list of available service plugins.

  5. The CLI will prompt you to name your service plugin. This is the name of the folder in the project repo that contains the service plugin code, and the name of the plugin that appears in your app dashboard when developing an app. Only you will see this name.

Upon completion, the extension files will be created in your project directory with the following structure:

Copy

Note: This is the default folder structure created by the CLI. You can move these files to any location within the src/ folder and update the references in your extensions.ts file. Learn more about the flexible file system.

Learn more about the service plugin extension files.

Step 2 | Test your service plugin extension

To check that your service plugin extension runs:

  1. Make sure your project uses the latest version of the CLI. To check and update your CLI version, see Keep the CLI up to date.

  2. Run the build command and then run the preview command.

  3. Open one of the preview links the CLI prints, select a development site, and click Install App. If your app is already installed on that site, clicking Install App updates it to the new preview.

  4. On that site, trigger the call to your service plugin.

    For example, to test a service plugin extension for Additional Fees that adds a $5 packaging fee to all orders:

    1. Open the store.
    2. Select any product and add it to the cart, then view the cart.
    3. Check if the additional fee is listed in the order summary.

Note: To learn how new and changed service plugins reach your app's users, see About App Versioning.

Build and deploy your project

Once your project is ready for production, you can build and deploy it.

Note: When you release an app project, you release a new version of the app allowing you to publish the app to the Wix App Market or install it on a site with a direct install URL. You can view your app's versions in the app dashboard.

Delete a service plugin extension

To delete a service plugin extension from your project:

  1. Delete the folder under src/extensions that contains your service plugin extension's files.
  2. Remove the import and .use() statements for the extension from the extensions.ts file.

For app projects:

If you already have a version of your app project, you must build and deploy the project again after removing the service plugin extension files.

Last updated: 19 October 2026

Did this help?