Automatically collect tax on invoices
Learn how to automatically calculate tax on your invoices.
On an invoice, Stripe Tax calculates sales tax, VAT, and GST. To calculate these for each line item, Stripe uses:
- Your tax settings
- The customer’s tax settings and location
- The product tax code and price tax behavior
Set up the customer ![](https://cdn.statically.io/img/b.stripecdn.com/docs-statics-srv/assets/fcc3a1c24df6fcffface6110ca4963de.svg)
We use the customer’s location to determine the relevant taxes to collect. Customers outside of the US need at least a country-level address, while customers in the US require a 5-digit postal code. For Canada, we need at least the province or postal code.
Set up line items![](https://cdn.statically.io/img/b.stripecdn.com/docs-statics-srv/assets/fcc3a1c24df6fcffface6110ca4963de.svg)
To calculate tax on each line item on an invoice, you need to set a tax behavior and optionally a tax code.
Customize tax settings for one-off line items![](https://cdn.statically.io/img/b.stripecdn.com/docs-statics-srv/assets/fcc3a1c24df6fcffface6110ca4963de.svg)
Customize line items in the Invoice Editor by selecting the tax behavior from the Include tax in price drop-down menu.
![Customize tax settings for one-off line items](https://cdn.statically.io/img/b.stripecdn.com/docs-statics-srv/assets/invoicing_price.faa90fb6b3cb833b900e06cb2187d339.png)
Customize tax settings for one-off line items
Customize tax settings for product-based line items ![](https://cdn.statically.io/img/b.stripecdn.com/docs-statics-srv/assets/fcc3a1c24df6fcffface6110ca4963de.svg)
You can use both the Dashboard and the API to customize tax settings for product-based line items.
Enable automatic tax ![](https://cdn.statically.io/img/b.stripecdn.com/docs-statics-srv/assets/fcc3a1c24df6fcffface6110ca4963de.svg)
After specifying a tax behavior and tax code, you can add the price to the customer as an invoice item:
Set the toggle in the Invoice Editor. In the API, you need to pass the automatic_
field to enable or disable automatic tax calculation. Both steps are required to start calculating tax automatically.
To enable automatic tax calculation when you update an invoice, add the invoice
parameter alongside automatic_
: