Specify product tax codes and tax behaviour
Add tax codes and tax behaviour to your products and prices to automatically calculate tax.
Stripe Tax uses product tax codes (PTCs) to associate products with their applicable tax rates, which might be lower or higher in different cities or countries. Assign each of your products a tax code to automatically apply the rate and other taxability rules.
If a product doesn’t fit any of the specific codes, use one of the codes with “General” in its name to apply the standard rate of the jurisdiction. 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.
The tax settings showing the preset tax codes, and the default shipping tax code.
Preset product tax code
The preset product tax code represents your product or service in Stripe Tax. We use the preset if you don’t explicitly specify a tax_
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.
If you sell multiple different product types (for example, SaaS and e-books), you could use test mode to change your preset tax code and review the impact of different product types on the Monitor tab.
Preset shipping tax code
The preset shipping tax code represents the tax treatment for shipping fees when charged. We use this if you don’t explicitly specify a tax_
on a shipping rate. Stripe Tax allows you to change the default shipping treatment to Non-taxable if you don’t want to charge any tax on shipping fees. We recommend you leave the default as “Shipping” to ensure the correct tax is always charged.
To charge tax on shipping for recurring payments, you can create a Product or pass product_
for a line item called “shipping” and select the shipping tax_
.
The taxability of shipping can vary by US state and country.
Tax behavior
You must specify a tax_
on a price, or a default tax behaviour in the tax settings in the Dashboard, which determines how tax is presented to the buyer. This allows you to localise your checkout depending on the market. When you set tax behaviour to exclusive, it adds tax to the subtotal amount you specify in your price. This is common in US markets and for B2B sales. When set to inclusive, the amount your buyer pays never changes, even if the tax rate varies. This is common practice for B2C buyers in many markets outside the US.
Setting a default tax behaviour (recommended)
You can define a default tax behaviour that applies to every price that has no tax behaviour defined. You can set up the default tax behaviour in the Stripe Tax settings under the Include tax in prices section.
After you set the default tax behaviour, all prices that don’t have a tax_
defined, use this setting and are ready for Stripe Tax. The options for the default tax behaviour are:
- Automatic: The tax behaviour is based on the currency that’s chosen for a product price. For the currencies
USD
andCAD
the tax behaviour is exclusive. For all other currencies the tax behaviour is inclusive. This also works with multi-currency Prices. - Inclusive: Inclusive tax is already included in the price. For example, a product has the price defined as 5.00 USD. The final price the customer pays is 5.00 USD.
- Exclusive: Exclusive tax is added on top of the price. For example, a product has the price defined as 5.00 USD. The tax charged on this product could be 10% and would result in a final price of 5.50 USD. (Tax rates might differ – this is only an explanatory example.)
To override this setting for an individual price, set a tax behaviour on a price.
Setting tax behaviour on a price (optional)
You can set the tax behaviour for a Price when creating it with the Dashboard or the API. When creating a Price in the Dashboard, you can inspect the impact of your pricing model on your revenue.
Caution
You can’t change tax_
after it’s been set to one of “exclusive” or “inclusive”.
To create a Price with tax_
through the API, it might look like this:
For a multi-currency Price, use the currency_options.<currency>.tax_behavior parameter to set different tax behaviours for different currencies.
In some cases, you might want to use a custom price that hasn’t been pre-configured. You can pass in price_
instead of a price ID. For example, accepting a one time payment for a custom price might look like this:
Setting a tax code on a product (recommended)
When creating Products in the Dashboard you can set your tax_
in the dropdown by searching for any available tax code. If you don’t, Stripe Tax uses the preset tax code defined on the Dashboard. If a product could fit multiple codes, for example, a SaaS product used for personal or business use depending on the type of customer, we recommend creating two separate products in Stripe and assigning the appropriate code to each.
To create a Product with tax_
using the API, it might look like this:
In some cases, you might want to use a custom product that hasn’t been pre-configured. You can pass in product_
instead of a product ID. For example, accepting a one time payment for a custom product might look like this:
Creating a shipping rate with tax code (optional)
Checkout payment mode allows you to set shipping rates and charge tax on shipping. You can automatically calculate tax on shipping charges by setting the tax code on the shipping rate in the Dashboard or API.