> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

## Resource: Introduction

## Article: Introduction

## Article Link: https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/extensions/tax/tax-calculation/introduction.md

## Article Content:

# 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](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/extensions/tax/tax-groups/introduction.md) and the 
[Tax Regions API](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/extensions/tax/tax-regions/introduction.md) to customize the application of tax for a business.

## Before you begin
It's important to note the following before starting to code: 
+ Tax is calculated based on the [tax region](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/extensions/tax/tax-regions/introduction.md) and a tax region requires an `appId` for an available tax calculator. Call [List Tax Calculators](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/extensions/tax/tax-calculation/list-tax-calculators.md) to retrieve a list of available tax calculators for a site, then create and manage your [tax regions](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/extensions/tax/tax-regions/introduction.md) before [calculating tax](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/extensions/tax/tax-calculation/calculate-tax.md).
+ Tax exemptions: Buyers who belong to a tax exempt group aren't charged tax in the group's regions. Apps can provide tax exempt groups through the [Tax Exempt Groups Provider service plugin](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/extensions/tax/tax-exempt-groups-integration-service-plugin/introduction.md).

## How the taxable address is chosen

[Calculate Tax](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/extensions/tax/tax-calculation/calculate-tax.md) 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
+ [Calculate multi-state tax for the United States](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/extensions/tax/tax-calculation/sample-flows.md#calculate-multi-state-tax-for-the-united-states)


## 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](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Fecom-platform/tax/).

