# Specify product tax codes and tax behavior

Add tax codes and tax behavior to your products and prices to automatically calculate tax.

Note: Log in or sign up for Stripe to enable Stripe Tax.

Stripe Tax uses product tax codes to associate products with their applicable tax rates. Assign each of your products a tax code to automatically apply the rate and other taxability rules. Tax codes within Stripe are always the same across different jurisdictions. However, individual products might have tax treatments that differ by location, and Stripe maintains current rate and taxability information for you, while staying up to date with any changing regulations.

See our list of available tax codes.

## Preset tax codes

When activating Stripe Tax you can set two types of preset tax codes: one for products and one for shipping. You can set both in the Tax settings in the Dashboard.

### Preset product tax code

We use the preset if you don’t explicitly specify a `tax_code` on your products or in `product_data` on your transactions. As you process payments, we also use the preset tax code to display the tax thresholds you might be approaching or have exceeded, under the Threshold monitoring section in your tax settings.

## Specify tax codes and tax behavior on products and prices

You can specify tax codes and tax behavior on products and prices.

### Products

When you create or update a product, you can assign a tax code.

#### Dashboard

1. Go to the **Products** page in the Dashboard.
2. Click **+ Add product**.
3. In the **Tax category** dropdown, select a tax code. If you don’t select a tax code, Stripe Tax uses the preset product tax code defined in your Tax Settings.
4. Click **Save product**.

#### API

When creating or updating a product, use the `tax_code` parameter.

```json
{
  "name": "T-shirt",
  "tax_code": "txcd_99999999"
}
```

### Prices

When you create or update a price, you can specify the `tax_behavior`.

#### Dashboard

1. Go to the **Products** page in the Dashboard.
2. Click on the product you want to update.
3. In the **Pricing** section, click **+ Add price**.
4. In the **Tax behavior** dropdown, select `inclusive`, `exclusive`, or `unspecified`.
    * `inclusive`: Tax is included in the price.
    * `exclusive`: Tax is added to the price.
    * `unspecified`: Stripe Tax uses the `tax_behavior` set on the product.
5. Click **Save price**.

#### API

When creating or updating a price, use the `tax_behavior` parameter.

```json
{
  "currency": "usd",
  "unit_amount": 2000,
  "tax_behavior": "exclusive"
}
```

## Tax behavior

The `tax_behavior` parameter determines how Stripe Tax calculates tax on a price.

| Value | Description |
|---|---|
| `inclusive` | Tax is included in the price. |
| `exclusive` | Tax is added to the price. |
| `unspecified` | Stripe Tax uses the `tax_behavior` set on the product. |

If you don’t specify a `tax_behavior` on a price, Stripe Tax uses the `tax_behavior` set on the product. If you don’t specify a `tax_behavior` on either the price or the product, Stripe Tax uses the default `tax_behavior` set in your Tax Settings.