Use Tax Rate objects to collect taxes (sales, VAT, GST, and others) for one-time payments in Stripe Checkout. There are two ways to collect taxes in Checkout:
- Use fixed tax rates when you know the exact tax rate to charge your customer before they start the checkout process (e.g., you only sell to customers in the UK and always charge 20% VAT).
- With the Prices API, you can use dynamic tax rates when you require more information from your customer (e.g., their billing or shipping address) before determining the tax rate to charge. With dynamic tax rates, you create tax rates for different regions (e.g., a 20% VAT tax rate for customers in the UK and a 7.25% sales tax rate for customers in California, US) and Stripe attempts to match your customer’s location to one of those tax rates.
Create tax rates
First, create tax rates for regions you need to collect taxes for. If you’re working with a small number of tax rates, it’s often simpler to use the Dashboard to create and manage them. After creating tax rates, you can pass them as either fixed or dynamic tax rates to the Checkout Session.
Create tax rates with the API
The following example demonstrates how you can create a tax rate with the API.
display_nameis a short-name that describes the specific type of tax, such as
inclusiveproperty determines whether the tax
percentageis either added to, or included in, the overall amount.
percentageis a number (up to 4 decimal places) that represents the tax percentage to be collected.
- The optional
countryproperty is a valid two-letter ISO country code. Some countries (e.g., United States) require an additional two-letter
stateproperty. Use these properties to apply dynamic tax rates based on your customer’s billing or shipping address in Checkout Sessions.
- The optional
jurisdictionproperty represents the tax jurisdiction of the tax rate and can be used to differentiate between tax rates of the same percentage. In the Dashboard, jurisdiction appears as the tax rate’s Region label.
- You can also store additional details in the
description. This property is not exposed to your customers.
Fixed tax rates
After creating a tax rate, pass its ID to line_item.tax_rates when you create a Checkout Session.
Dynamic tax rates
This list matches tax rates to your customer’s shipping address or billing address. The shipping address takes precedence over the billing address for determining the tax rate to charge.
Billing address collection is automatically enabled when using dynamic tax rates. If you’re not collecting a shipping address, your customer’s billing address is used to determine the tax rate. If you haven’t passed a tax rate that matches your customer’s shipping or billing address, no tax rate is applied.
Tax reporting and remittance
Any business collecting taxes ultimately needs to remit tax to the appropriate government. You can use Stripe’s data exports to populate the periodic reports that you are required to make to taxation authorities.
From the Dashboard’s Tax Rates list, you can export data files required for tax reporting calculations.
When using Checkout in payment mode, use the following two tax reporting exports:
- Checkout payment mode line item tax export — Includes details down to the line-item level, including per-line-item tax rates, inclusive/exclusive, amounts, etc. This is a lower-level export.
- Checkout payment mode totals export — Shows the aggregate tax collected on the Checkout Session as a whole, including adjustments for any refunds.
For remittance reporting, use the Checkout payment mode line item tax export to sum all amounts paid for all tax rates used. To factor in any refunds you will also need to pivot against the Checkout payment mode totals export.