About the Tax Calculation Provider Service Plugin

Note: This service plugin will be deprecated on September 30, 2025. Use the identical Tax Calculation service plugin in the @wix/ecom module instead.

As a tax calculation provider, you can integrate with Wix to allow merchants to request and use your services on their Wix sites. The tax calculated is then included on the site's cart and checkout pages.

The integration is done via an app in the Wix App Market and by implementing the Tax Calculation Provider Service Plugin. After the app is installed on a site, Wix triggers a call to your service whenever the site needs to calculate tax for a transaction.

Using the service plugin, you can design your app to calculate taxes for different regions and based on various tax groups.

Get started

Follow these steps to begin implementing your service plugin.

Choose a framework

You can implement this service plugin with the following frameworks:

Configure your service plugin

To configure and customize your plugin, you need to provide important information in the service plugin configuration file. You can configure your plugin in the Wix Dev Center. For details, see Tax Calculation Provider Extension Configuration.

Define handler functions

Use taxCalculationProvider.provideHandlers() to define the following handler function that implements your custom business logic.

FunctionRequired
calculateTax()Yes

Code examples

Below is an example for implementing the Tax Calculation Provider service plugin in your code.

CLI: Basic code structure

This is the basic code structure for implementing the Tax Calculation Provider service plugin with the Wix CLI:

Copy

Self-hosted: Basic code structure

This is the basic code structure for implementing a self-hosted Tax Calculation service plugin:

Copy

Use case

Terminology

  • Tax Region: A location, defined by country and subdivision with a specific tax treatment. Tax is calculated based on the tax region and the tax group associated with a line item. See the Tax Regions API.
  • Tax Group: A category of products that share the same tax treatment. Tax is calculated based on the tax group and the tax region associated with a line item. See the Tax Groups API.
  • Tax Calculator: An app that is used under the hood to calculate tax for a Wix site. The app calculates tax based on the tax group of the product and the tax region of the sale. By integrating with the Tax Calculation service plugin, your app becomes a tax calculator.

See also

Did this help?