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.
It's important to note the following before starting to code:
appId for an available tax calculator. Call List Tax Calculators to retrieve a list of available tax calculators for a site, then create and manage your tax regions before calculating tax.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.
Last updated: 21 July 2026