Sign in
An image of the Stripe logo
Create account
Sign in
Home
Payments
Business operations
Financial services
Developer tools
No-code
All products
Home
Payments
Business operations
Home
Payments
Business operations
Financial services
Developer tools
Overview
Fraud detection
Stripe data
Financial reports
Payment authentication reports
Revenue recognition
Startup incorporation
Climate
Identity
Tax
    Overview
    Getting Started
    Set up
    Configure your tax settings
    Select tax categories
    Monitor your tax obligations
    Add a tax registration
    Tax registration rules by location
    Integrating
    Set tax categories, products, and prices
    Payment Links and Tax
    Checkout and Tax
    Invoicing and Tax
    Billing and Tax
    Custom payments flows and Tax
    Manage your integration
    How tax is calculated
    Sales Tax Holidays
    Account and customer tax IDs
    Address validation
    Zero tax amounts and reverse charges
    Tax compliance
    End-to-end tax compliance
    Reporting
    Filing and Remittance
    Frequently asked questions
Financial Connections
Account
Dashboard
Tax
·
HomeBusiness operationsTax

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

Log in or sign up for Stripe to activate Stripe Tax.

Set up the customer

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.

You can add customer location information in the Customer details page by clicking Edit next to Details. To add a customer’s location from the Invoice Editor, click the overflow menu (

) next to the customer. Select Edit customer information, click Add additional details, and scroll down to Billing details.

After you update the location, click Update customer. Stripe applies the new location to all of your customer’s future invoices unless you update it. For more information, see Determine customer locations.

Set up line items

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

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

Customize tax settings for one-off line items

Customize tax settings for product-based line items

You can use both the Dashboard and the API to customize tax settings for product-based line items.

On the Products page, you can select both the tax behavior for a particular price and the optional tax code for the product. The tax behavior is per price. You can’t change the tax behavior after you select it, but you can create new prices or archive old ones. To set up a tax behavior, click Add a price (or Add another price if you already have one) and select it from the Tax behavior drop-down menu.

To set up a tax code, select it from the Tax code drop-down menu when you create a new product or edit the details of an existing one.

Customize tax settings for one-off line items

Customize tax settings for one-off line items

Enable automatic tax

After specifying a tax behavior and tax category, you can add the price to the customer as an invoice item:

Command Line
curl https://api.stripe.com/v1/invoiceitems \ -u
sk_test_4eC39HqLyjWDarjtT1zdp7dc
: \ -d customer=cus_13729he8947269 \ -d price=price_1K6mzG2eZvKYlo2CK7kcBICl

Set the toggle in the Invoice Editor. In the API, you need to pass the automatic_tax field to enable or disable automatic tax calculation. Both steps are required to start calculating tax automatically.

Command Line
curl https://api.stripe.com/v1/invoices \ -u
sk_test_4eC39HqLyjWDarjtT1zdp7dc
: \ -d "customer"="cus_13729he8947269" \ -d "automatic_tax[enabled]"="true"

To enable automatic tax calculation when you update an invoice, add the invoice parameter alongside automatic_tax:

Command Line
curl https://api.stripe.com/v1/invoices \ -u
sk_test_4eC39HqLyjWDarjtT1zdp7dc
: \ -d "invoice"="inv_12345" \ -d "automatic_tax[enabled]"="true"

See also

  • Determine customer locations
  • Understand zero tax amounts
  • Reporting and filing
Was this page helpful?
Need help? Contact Support.
Watch our developer tutorials.
Check out our product changelog.
Questions? Contact Sales.
Powered by Markdoc
You can unsubscribe at any time. Read our privacy policy.
On this page
Set up the customer
Set up line items
Enable automatic tax
See also
Stripe Shell
Test mode
Welcome to the Stripe Shell! Stripe Shell is a browser-based shell with the Stripe CLI pre-installed. Login to your Stripe account and press Control + Backtick on your keyboard to start managing your Stripe resources in test mode. - View supported Stripe 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.
$