Sign in
An image of the Stripe logo
Create account
Sign in
Home
Payments
Business operations
Financial services
Developer tools
Security
All products
Home
Payments
Business operations
Home
Payments
Business operations
Financial services
Developer tools
Support

Applying taxes to subscriptions

Learn how to set taxes on subscriptions so that Stripe can calculate invoice tax amounts for you.

To collect taxes on a subscription, either set tax rates on the subscription, or set the tax rates on invoices as the subscription cycles. Or, if you use Checkout, you can specify tax rates in Checkout Sessions to apply taxes to subscriptions.

Recommended: Setting tax rates on a subscription

Subscriptions create draft invoices that stay editable for about an hour. During this time, you can correct the tax rates using the steps outlined below.

You can apply taxes at the subscription level and the subscription item level and set up to five tax rates on each subscription item.

When invoices are generated for subscriptions, tax rates are copied from the subscription to the invoice. In the example below, the first subscription item has two tax rates: 3% and 5%, which overrides the 1% from the subscription level tax rate. The second item doesn’t have any tax rates set directly on it, so the 1% from the subscription level tax rate is automatically applied.

Subscription item 13% and 5%➡️Invoice item 13% and 5%
Subscription item 2(no tax set)➡️Invoice item 2(no tax set)
Subscription1%➡️Invoice1%

You can set tax rates when you create or update subscription items by passing the tax rate IDs. The example below updates an existing subscription item with two tax rates:

Terminal
curl https://api.stripe.com/v1/subscription_items/si_F2yjdxUlCCOAtv \ -u
sk_test_4eC39HqLyjWDarjtT1zdp7dc
: \ -d "tax_rates[0]"="txr_1F6kmAAJVYItwOKqV9IWehUH" \ -d "tax_rates[1]"="txr_2J8lmBBGHJYyuUJqF6QJtkNM"

You can set subscription level tax rates when you create or update subscriptions. Set the tax rates you want to apply by passing the default tax rate IDs. The example below updates an existing subscription with two tax rates:

Terminal
curl https://api.stripe.com/v1/subscriptions/sub_BVxXIrxAAYb7Fb \ -u
sk_test_4eC39HqLyjWDarjtT1zdp7dc
: \ -d "default_tax_rates[0]"="txr_1EO66sClCIKljWvs98IiVfHW" \ -d "default_tax_rates[1]"="txr_1EEOvcClCIKljWvsqYb9U0MB"

Dynamically configuring tax rates on each subscription cycle

If you add extra invoice items, or sell in enough jurisdictions that tax rates change frequently, dynamically calculate and assign tax rates to the subscription’s invoice as it’s created.

When a subscription renews and creates an invoice, Stripe sends the invoice.created webhook event. Stripe waits approximately one hour before finalizing the invoice and attempting payment or sending an email. During that delay, the invoice is a draft and is editable. Follow the process to assign tax rates to that invoice.

Adding tax rates to Checkout

You can specify tax rates (Sales, VAT, GST, and others) in Checkout Sessions to apply taxes to subscriptions.

  • Use fixed tax rates when you know the exact tax rate to charge your customers before they start the checkout process (for example, 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 (for example, their billing or shipping address) before determining the tax rate to charge. With dynamic tax rates, you create tax rates for different regions (for example, 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.

Set subscription_data.default_tax_rates to apply a default tax rate to a subscription started with Checkout.

Terminal
curl https://api.stripe.com/v1/checkout/sessions \ -u
sk_test_4eC39HqLyjWDarjtT1zdp7dc
: \ -d "payment_method_types[]"=card \ -d "line_items[][price]"=
"{{PRICE_ID}}"
\ -d "line_items[][quantity]"=1 \ -d "subscription_data[default_tax_rates][]"="{{TAX_RATE_ID}}" \ -d mode=subscription \ -d success_url="https://example.com/success" \ -d cancel_url="https://example.com/cancel"

You can also specify line_items.tax_rates or subscription_data.items.tax_rates to apply tax rates to specific plans or invoice line items.

Terminal
curl https://api.stripe.com/v1/checkout/sessions \ -u
sk_test_4eC39HqLyjWDarjtT1zdp7dc
: \ -d "payment_method_types[]"="card" \ -d "line_items[][price]"=
"{{PRICE_ID}}"
\ -d "line_items[][quantity]"=1 \ -d "line_items[][tax_rates][0]"="{{TAX_RATE_ID}}" \ -d "mode"="subscription" \ -d "success_url"="https://example.com/success" \ -d "cancel_url"="https://example.com/cancel"

You can use Stripe’s data exports to populate the periodic reports required for remittance. Visit Tax reporting and remittance for more information.

Next steps

Now that you understand how to charge taxes on subscriptions, you may want to check out:

  • Tax Rates
  • Tax Rates on Invoices
Was this page helpful?
Questions? Contact us.
View developer tutorials on YouTube.
Check out our product changelog.
Powered by Markdoc
You can unsubscribe at any time. Read our privacy policy.
On this page
Recommended: Setting tax rates on a subscription
Dynamically configuring tax rates on each subscription cycle
Adding tax rates to Checkout
Stripe Shell
Test mode
▗▄ ▄▟█ █▀▀ ▗▟████▙▖ ██████ ███▗▟█ ███ ███▗▟██▙▖ ▗▟█████▙▖ ███▖ ▀▀ ███ ███▀▀▀ ███ ███▀ ███ ███ ███ ▝▜████▙▖ ███ ███ ███ ███ ███ █████████ ▄▄ ▝███ ███ ▄ ███ ███ ███▄ ███ ███ ▄▄ ▝▜████▛▘ ▝▜███▛ ███ ███ ███▝▜██▛▘ ▝▜█████▛▘ ███ ▀▘
Welcome to the Stripe Shell! Stripe Shell is a browser-based shell with the Stripe CLI pre-installed. Login to Stripe docs and press Control + Backtick on your keyboard to start managing your Stripe resources in test mode. - View supported commands: - Find webhook events: - Listen for webhook events: - Call Stripe APIs: stripe [api resource] [operation] (e.g. )
The Stripe Shell is best experienced on desktop.
$