Billing
Additional features
Tax rates on invoices

Tax rates on invoices

Assign tax rates to draft invoices to have Stripe calculate tax amounts for you.

You can assign tax rates:

  • On individual invoice-items (recommended).
  • On the entire invoice’s subtotal.

You need to create tax rates before you can use them on invoices. See our creating tax rates documentation for instructions.

Recommended: Setting Tax Rates on individual items

If creating an invoice through the Dashboard, simply assign tax rates to individual line items.

When modifying or creating invoice line items through the API, set the invoice item’s tax_rates:

curl https://api.stripe.com/v1/invoiceitems/ii_CWYWo9Ham19N4a \ -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \ -d "tax_rates[0]"=txr_1EO66sClCIKljWvs98IiVfHW \ -d "tax_rates[1]"=txr_1EEOvcClCIKljWvsqYb9U0MB
# Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' Stripe::InvoiceItem.update( 'ii_CWYWo9Ham19N4a', { tax_rates: [ 'txr_1EO66sClCIKljWvs98IiVfHW', 'txr_1EEOvcClCIKljWvsqYb9U0MB', ], } )
# Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' stripe.InvoiceItem.modify( 'ii_CWYWo9Ham19N4a', tax_rates=[ 'txr_1EO66sClCIKljWvs98IiVfHW', 'txr_1EEOvcClCIKljWvsqYb9U0MB', ] )
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys \Stripe\Stripe::setApiKey('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); \Stripe\InvoiceItem::update( 'ii_CWYWo9Ham19N4a', [ 'tax_rates' => [ 'txr_1EO66sClCIKljWvs98IiVfHW', 'txr_1EEOvcClCIKljWvsqYb9U0MB', ], ] );
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.apiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; InvoiceItem invoiceItem = InvoiceItem.retrieve("ii_CWYWo9Ham19N4a"); InvoiceItemUpdateParams params = InvoiceItemUpdateParams.builder() .addTaxRate("txr_1EO66sClCIKljWvs98IiVfHW") .addTaxRate("txr_1EEOvcClCIKljWvsqYb9U0MB") .build(); invoiceItem.update(params);
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys const stripe = require('stripe')('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); const invoiceItem = await stripe.invoiceItems.update( 'ii_CWYWo9Ham19N4a', { tax_rates: [ 'txr_1EO66sClCIKljWvs98IiVfHW', 'txr_1EEOvcClCIKljWvsqYb9U0MB', ], } );
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys stripe.Key = "sk_test_4eC39HqLyjWDarjtT1zdp7dc" params := &stripe.InvoiceItemParams{ TaxRates: stripe.StringSlice([]string{ "txr_1EO66sClCIKljWvs98IiVfHW", "txr_1EEOvcClCIKljWvsqYb9U0MB", }), } ii, err := invoiceitem.Update("ii_CWYWo9Ham19N4a", params)
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys StripeConfiguration.ApiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; var options = new InvoiceItemUpdateOptions { TaxRates = new List<string> { "txr_1EO66sClCIKljWvs98IiVfHW", "txr_1EEOvcClCIKljWvsqYb9U0MB", }, }; var service = new InvoiceItemService(); var invoiceItem = service.Update("ii_CWYWo9Ham19N4a", options);

You can add as many as five tax rates to each line item.

For lines of type subscription or invoiceitem, use the line item id. For lines of type=invoiceitem, you can also use the value of the invoice_item field.

Setting default tax rates for the entire invoice

If you sell one type of product, or have simple tax needs, you can set a default tax rate on the invoice. Default tax rates apply to all line items on the invoice. For more complex use cases, you can also set an item level tax rate that overrides the default tax rate.

If creating an invoice through the Dashboard, assign default tax rates to apply to the invoice.

Set the invoice’s default tax rates through the API:

curl https://api.stripe.com/v1/invoices/in_18jwqyLlRB0eXbMtrUQ97YBw \ -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \ -d "default_tax_rates[0]"=txr_1EO66sClCIKljWvs98IiVfHW \ -d "default_tax_rates[1]"=txr_1EEOvcClCIKljWvsqYb9U0MB
# Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' Stripe::Invoice.update( 'in_18jwqyLlRB0eXbMtrUQ97YBw', { default_tax_rates: [ 'txr_1EO66sClCIKljWvs98IiVfHW', 'txr_1EEOvcClCIKljWvsqYb9U0MB', ], } )
# Set your secret key. Remember to switch to your live secret key in production! # See your keys here: https://dashboard.stripe.com/account/apikeys stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' stripe.Invoice.modify( 'in_18jwqyLlRB0eXbMtrUQ97YBw', default_tax_rates=[ 'txr_1EO66sClCIKljWvs98IiVfHW', 'txr_1EEOvcClCIKljWvsqYb9U0MB', ] )
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys \Stripe\Stripe::setApiKey('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); \Stripe\Invoice::update( 'in_18jwqyLlRB0eXbMtrUQ97YBw', [ 'default_tax_rates' => [ 'txr_1EO66sClCIKljWvs98IiVfHW', 'txr_1EEOvcClCIKljWvsqYb9U0MB', ], ] );
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.apiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; Invoice invoice = Invoice.retrieve("in_18jwqyLlRB0eXbMtrUQ97YBw"); InvoiceUpdateParams params = InvoiceUpdateParams.builder() .addDefaultTaxRate("txr_1EO66sClCIKljWvs98IiVfHW") .addDefaultTaxRate("txr_1EEOvcClCIKljWvsqYb9U0MB") .build(); invoice.update(params);
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys const stripe = require('stripe')('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); const invoice = await stripe.invoices.update( 'in_18jwqyLlRB0eXbMtrUQ97YBw', { default_tax_rates: [ 'txr_1EO66sClCIKljWvs98IiVfHW', 'txr_1EEOvcClCIKljWvsqYb9U0MB', ], } );
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys stripe.Key = "sk_test_4eC39HqLyjWDarjtT1zdp7dc" params := &stripe.InvoiceParams{ DefaultTaxRates: stripe.StringSlice([]string{ "txr_1EO66sClCIKljWvs98IiVfHW", "txr_1EEOvcClCIKljWvsqYb9U0MB", }), } i, _ := invoice.Update("in_18jwqyLlRB0eXbMtrUQ97YBw", params)
// Set your secret key. Remember to switch to your live secret key in production! // See your keys here: https://dashboard.stripe.com/account/apikeys StripeConfiguration.ApiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"; var options = new InvoiceUpdateOptions { DefaultTaxRates = new List<string> { "txr_1EO66sClCIKljWvs98IiVfHW", "txr_1EEOvcClCIKljWvsqYb9U0MB", }, }; var service = new InvoiceService(); var invoice = service.Update("in_18jwqyLlRB0eXbMtrUQ97YBw", options);

You can add as many as five default tax rates to each invoice.

Was this page helpful?
Questions? Contact us.
Developer tutorials on YouTube.