About the Tax Calculation API

The Tax Calculation API allows you to retrieve the available tax calculators for a site and to calculate tax. Use the Tax Calculations API together with the Tax Groups API and the Tax Regions API to customize the application of tax for a business.

Before you begin

It's important to note the following before starting to code:

How the taxable address is chosen

Calculate Tax matches each line item to a tax region using the address that the line item's addressIndex points to in the request's addresses array. addressIndex is required on every line item. If it's missing, Calculate Tax returns MISSING_TAXABLE_ADDRESS; if it points to a position that isn't in the addresses array, it returns INVALID_LINE_ITEM_ADDRESS_INDEX.

You choose which address each line item points to. When Wix commerce apps call Calculate Tax during cart and checkout, they set each line item's addressIndex based on the item type: the shipping address for physical, shippable items; the billing address for digital items and gift cards; and the business (origin) address for services and as a fallback. If you call Calculate Tax directly, set addressIndex to whichever address should determine each line item's tax region.

Zero tax is returned only when the address is valid but no tax region matches its location. For example, no region exists for that country or subdivision, or the region's subdivision was stored as a display name instead of an ISO code.

Use cases

Terminology

  • 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. A site assigns each tax region to the Wix manual tax calculator or an external calculator app to properly calculate tax.
  • Wix manual tax calculator: The default tax calculator installed with a Wix site. The tax rates to apply for this calculator can be manually adjusted in the Tax Settings in the Wix dashboard.

Last updated: 21 July 2026

Did this help?