# Third-party tax for agentic commerce

Use a third-party tax provider to calculate tax on agentic commerce transactions.

You can use a third-party tax provider to calculate tax on [agentic commerce](https://docs.stripe.com/agentic-commerce.md) transactions. This guide covers how to set up a supported third-party tax app for agentic commerce, including product feed configuration and provider-specific setup.

For general information about third-party tax apps, see [Third-party tax apps](https://docs.stripe.com/tax/third-party-apps.md).

## Before you begin 

Make sure you have:

- A Stripe account with [agentic commerce](https://docs.stripe.com/agentic-commerce/for-sellers.md) configured.
- A supported third-party tax provider account.
- Access to your third-party tax provider dashboard.

## Supported providers 

| Feature | Anrok | Avalara | [Stripe Tax](https://docs.stripe.com/tax.md) |
| --- | --- | --- | --- |
| Agentic commerce | ✓ | [Sign up for preview](https://docs.stripe.com/tax/third-party-apps/agentic-commerce.md#stripe_tax_api_betas_agentic_commerce_avalara_preview) | ✓ |

### Interested in using agentic commerce with Avalara?

Enter your email to request access.

```bash
curl https://docs.stripe.com/preview/register \
  -X POST \
  -H "Content-Type: application/json" \
  -H "Referer: https://docs.stripe.com/tax/third-party-apps/agentic-commerce" \
  -d '{"email": "EMAIL", "preview": "stripe_tax_api_betas_agentic_commerce_avalara_preview"}'
```

For a full comparison of supported integrations and features across all providers, see [Supported integrations and features](https://docs.stripe.com/tax/third-party-apps/supported-integrations.md).

## Set up your third-party tax app 

To enable third-party tax calculation for agentic commerce, install and configure your tax provider’s Stripe app, then classify products in your [product feed](https://docs.stripe.com/agentic-commerce/product-feed.md) with `third_party_tax_code` instead of `stripe_product_tax_code`.

### Install and configure your third-party Stripe app 

The app installation steps are the same for each supported third-party tax provider:

1. Install your provider’s app from the [Stripe Apps Marketplace](https://marketplace.stripe.com/).
2. Follow your provider’s onboarding flow to connect your Stripe account.
3. Go to the [integrations tab](https://dashboard.stripe.com/settings/tax/integrations) in your Tax settings.
4. Enable automatic tax and select your installed third-party tax app as your tax calculation provider.

### Product feed tax code format 

When using a third-party tax provider, set the `third_party_tax_code` column in your product data CSV. Format the value as `provider:tax_code` with a lowercase provider name.

| Field | Format | Example |
| --- | --- | --- |
| `third_party_tax_code` | `anrok:product_id` | `anrok:example_agentic_commerce_product` |

If you currently use `stripe_product_tax_code`, replace it with `third_party_tax_code` when switching to a third-party provider. You only need to set one of the two fields per product.

### Provider-specific considerations 

After you install and configure your third-party Stripe app, use the following provider-specific guidance to configure tax codes for agentic commerce.

#### Anrok

#### Configure tax codes in Anrok 

In the Anrok dashboard, configure default tax codes so Anrok can determine the correct tax treatment for your products.

1. Go to [Data sources](https://app.anrok.com) in your Anrok dashboard and find your connected Stripe account.
2. Click the overflow menu (⋯) next to your Stripe data source and select **Configure new products**.
3. Scroll down to set the **default product tax code** for products to specify default tax treatment for your products.
4. Set the **default shipping tax code** for shipping charges.
5. Save your configuration.

> You must configure default tax codes for both products and shipping in Anrok. If shipping tax codes aren’t configured, tax calculations on orders with shipping might return zero tax.

#### Create a product in the Anrok dashboard 

Before referencing a product ID in your product feed, create a product in the Anrok dashboard with an explicit custom product ID (for example, `example_agentic_commerce_product`) and assign it an appropriate product tax category (PTC). See [Available product tax categories for product IDs](https://help-center.anrok.com/hc/en-us/articles/4412669541907-Available-product-tax-categories-PTC-for-product-IDs) for the full list of available PTCs.

#### Set third-party tax codes in your product feed 

In your product data CSV, set the `third_party_tax_code` field using the `anrok:` prefix followed by the product ID you created in the Anrok dashboard.

```csv
id,title,...,third_party_tax_code,tax_behavior
SKU400001,Llama plushie,...,anrok:example_agentic_commerce_product,exclusive
```

If you don’t specify a provider product ID, Anrok uses the [default product tax code](https://docs.stripe.com/tax/third-party-apps/agentic-commerce.md#anrok-tax-codes) configured for your account.

## Troubleshoot 

### Tax amount is zero 

- Verify that you configured default tax codes for both products and shipping in your tax provider’s dashboard.
- Make sure the customer’s shipping address is in a jurisdiction where tax applies.
- Check that your `third_party_tax_code` values in the product feed are valid codes recognized by your provider.
- For more help, see [Anrok’s documentation](https://www.anrok.com/integrations).

## See also

- [Third-party tax apps](https://docs.stripe.com/tax/third-party-apps.md)
- [Supported integrations and features](https://docs.stripe.com/tax/third-party-apps/supported-integrations.md)
- [Sell through agents](https://docs.stripe.com/agentic-commerce/for-sellers.md)
- [Product feed specification](https://docs.stripe.com/agentic-commerce/product-feed.md)
