Skip to content
Create account or Sign in
The Stripe Docs logo
/
Ask AI
Create accountSign in
Get started
Payments
Revenue
Platforms and marketplaces
Money management
Developer resources
APIs & SDKsHelp
Overview
Billing
OverviewAbout the Billing APIs
Subscriptions
Invoicing
Usage-based billing
Advanced usage-based billing
Quotes
Customer management
Billing with other products
Revenue recovery
Automations
Test your integration
Tax
Overview
Use Stripe Tax
    How Tax works
    Set up collection
    Configure behavior
    Testing
    Find your payment type
    Find your business type
      Connect
      Ticket sales
      Physical goods
      Custom integration
    Supported countries
Manage compliance
Reporting
Overview
Select a report
Configure reports
Reports for multiple accounts
Reports API
Revenue recognition
Data
Overview
Query business data
Sigma
Data Pipeline
Import external data
United States
English (United States)
HomeRevenueUse Stripe TaxFind your business type

Collect taxes

Use Stripe Tax APIs to implement tax calculations in your custom integration.

Stripe Tax APIs enable you to calculate tax in custom payment flows. After your customer completes their payment, record the transaction so it appears in Stripe Tax reporting. The examples in this guide use Stripe payments APIs, but you can use the Tax API with any payment processor, or multiple payment processors.

For most integrations, we recommend using the Checkout Sessions API with Stripe Tax.

Alternatively, you can integrate Stripe Tax with Payment Links, Checkout, Billing, and Invoicing with no or low code setups.

Stripe Tax APIs enable you to calculate tax in custom payment flows. After your customer completes their payment, record the transaction so it appears in Stripe Tax reporting. The examples in this guide use Stripe payments APIs, but you can use the Tax API with any payment processor, or multiple payment processors.

If your custom payment flow uses the Payment Intents API, see Calculate tax in your custom payment flows. This integration offers automatic liability tracking, receipts and Dashboard support. We also offer a public preview feature that lets you use the Tax ID Element to collect tax IDs from customers. See Collect customer tax IDs below for more information.

Alternatively, you can integrate Stripe Tax with Payment Links, Checkout, Billing, and Invoicing with no or low code setups.

Get started

This short video walks through a Stripe Tax API integration that uses the Payment Intents API and the Payment Element.

Loading video content...

Add registrations

Stripe Tax only calculates tax in jurisdictions where you’re registered to collect tax. You must add your registrations in the Dashboard.

OptionalCollect customer address
Client-side

Calculate tax
Server-side

You choose when and how often to calculate tax. For example, you can:

  • Show a tax estimate based on your customer’s IP address when they enter your checkout flow
  • Recalculate tax as your customer types their billing or shipping address
  • Calculate the final tax amount to collect when your customer finishes typing their address

Stripe charges a fee per tax calculation API call. You can throttle tax calculation API calls to manage your costs.

The examples below show how to calculate tax in a variety of scenarios. Stripe Tax only calculates tax in jurisdictions where you’re registered to collect tax. You must add your registrations in the Dashboard.

This example calculates tax for a US shipping address. The line item has a price of 10 USD and uses your account’s preset tax code.

Command Line
cURL
Stripe CLI
Ruby
Python
PHP
Java
Node.js
Go
.NET
No results
curl https://api.stripe.com/v1/tax/calculations \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -d currency=usd \ -d "line_items[0][amount]"=1000 \ -d "line_items[0][reference]"=L1 \ -d "customer_details[address][line1]"="920 5th Ave" \ -d "customer_details[address][city]"=Seattle \ -d "customer_details[address][state]"=WA \ -d "customer_details[address][postal_code]"=98104 \ -d "customer_details[address][country]"=US \ -d "customer_details[address_source]"=shipping

The calculation response contains amounts you can display to your customer, and use to take payment:

AttributeDescription
amount_totalThe grand total after calculating tax. Use this to set the PaymentIntent amount to charge your customer.
tax_amount_exclusiveThe amount of tax added on top of your line item amounts and shipping cost. This tax amount increases the amount_total. Use this to show your customer the amount of tax added to the transaction subtotal.
tax_amount_inclusiveThe amount of tax that’s included in your line item amounts and shipping cost (if using tax-inclusive pricing). This tax amount doesn’t increase the amount_total. Use this to show your customer the tax included in the total they’re paying.
tax_breakdownA list of tax amounts broken out by country or state tax rate. Use this to show your customer the specific taxes you’re collecting.

Handle customer location errors

The calculation returns the customer_tax_location_invalid error code, if your customer’s address is invalid or isn’t precise enough to calculate tax:

{ "error": { "doc_url": "https://docs.stripe.com/error-codes#customer-tax-location-invalid", "code": "customer_tax_location_invalid", "message": "We could not determine the customer's tax location based on the provided customer address.", "param": "customer_details[address]", "type": "invalid_request_error" } }

If you receive this error, prompt your customer to check the address they entered and fix any typos.

Use calculation with another processor

If you process transactions outside of Stripe, you can skip the following steps and apply the calculation to your externally-processed transactions.

Create tax transaction
Server-side

Creating a tax transaction records the tax you’ve collected from your customer, so that later you can download exports and generate reports to help with filing your taxes. You can create a transaction from a calculation until the expires_at timestamp, 90 days after it’s created. Attempting to use it after this time returns an error.

Note

The transaction is considered effective on the date when create_from_calculation is called, and tax amounts won’t be recalculated.

When creating a tax transaction, you must provide a unique reference for the tax transaction and each line item. The references appear in tax exports to help you reconcile the tax you collected with the orders in your system.

For example, a tax transaction with reference pi_123456789, line item references L1 and L2, and a shipping cost, looks like this in the itemized tax exports:

IDline_item_idtypecurrencytransaction_date
pi_123456789L1externalusd2023-02-23 17:01:16
pi_123456789L2externalusd2023-02-23 17:01:16
pi_123456789shippingexternalusd2023-02-23 17:01:16

When your customer pays, use the calculation ID to record the tax collected. You can do this in two ways:

  • If your server has an endpoint where your customer submits their order, you can create the tax transaction after the order is successfully submitted.
  • Listen for the payment_intent.succeeded webhook event. Retrieve the calculation ID from the PaymentIntent metadata.

The example below creates a transaction and uses the PaymentIntent ID as the unique reference:

Command Line
cURL
Stripe CLI
Ruby
Python
PHP
Java
Node.js
Go
.NET
No results
curl https://api.stripe.com/v1/tax/transactions/create_from_calculation \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -d calculation={{TAX_CALCULATION}} \ -d reference=
"{{PAYMENT_INTENT_ID}}"
\ -d "expand[]"=line_items

Store the tax transaction ID to record refunds later. You can store the transaction ID in your database or in the PaymentIntent’s metadata:

Command Line
cURL
Stripe CLI
Ruby
Python
PHP
Java
Node.js
Go
.NET
No results
curl https://api.stripe.com/v1/payment_intents/
{{PAYMENT_INTENT_ID}}
\ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -d "metadata[tax_transaction]"={{TAX_TRANSACTION}}

Record refunds
Server-side

After creating a tax transaction to record a sale to your customer, you might need to record refunds. These are also represented as tax transactions, with type=reversal. Reversal transactions offset an earlier transaction by having amounts with opposite signs. For example, a transaction that recorded a sale for 50 USD might later have a full reversal of -50 USD.

When you issue a refund (using Stripe or outside of Stripe), you must create a reversal tax transaction with a unique reference. Common strategies include:

  • Append a suffix to the original reference. For example, if the original transaction has reference pi_123456789, then create the reversal transaction with reference pi_123456789-refund.
  • Use the ID of the Stripe refund or a refund ID from your system. For example, re_3MoslRBUZ691iUZ41bsYVkOg or myRefund_456.

Choose the approach that works best for how you reconcile your customer orders with your tax exports.

Fully refund a sale

When you fully refund a sale in your system, create a reversal transaction with mode=full.

In the example below, tax_1MEFAAI6rIcR421eB1YOzACZ is the tax transaction that records the sale to your customer:

Command Line
cURL
Stripe CLI
Ruby
Python
PHP
Java
Node.js
Go
.NET
No results
curl https://api.stripe.com/v1/tax/transactions/create_reversal \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -d mode=full \ -d original_transaction=tax_1MEFAAI6rIcR421eB1YOzACZ \ -d reference=pi_123456789-cancel \ -d "expand[]"=line_items

This returns the full reversal transaction that’s created:

{ "id": "tax_1MEFtXI6rIcR421e0KTGXvCK", "object": "tax.transaction", "created": 1670866467, "currency": "eur", "customer": null, "customer_details": { "address": { "city": null, "country": "IE",

Fully reversing a transaction doesn’t affect previous partial reversals. When you record a full reversal, make sure you fully reverse any previous partial reversals for the same transaction to avoid duplicate refunds.

Partially refund a sale

After issuing a refund to your customer, create a reversal tax transaction with mode=partial. This allows you to record a partial refund by providing the line item amounts refunded. You can create up to 30 partial reversals for each sale. Reversing more than the amount of tax you collected returns an error.

The example below records a refund of only the first line item in the original transaction:

Command Line
cURL
Stripe CLI
Ruby
Python
PHP
Java
Node.js
Go
.NET
No results
curl https://api.stripe.com/v1/tax/transactions/create_reversal \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -d mode=partial \ -d original_transaction=tax_1MEFAAI6rIcR421eB1YOzACZ \ -d reference=pi_123456789-refund_1 \ -d "line_items[0][original_line_item]"=tax_li_MyBXPByrSUwm6r \ -d "line_items[0][reference]"=L1 \ -d "line_items[0][amount]"=-4999 \ -d "line_items[0][amount_tax]"=-1150 \ -d "metadata[refund]"=
"{{REFUND_ID}}"
\ --data-urlencode "metadata[refund_reason]"="Refunded line 1 of pi_123456789 (customer was unhappy)" \ -d "expand[0]"=line_items

This returns the partial reversal transaction that’s created:

{ "id": "tax_1MEFACI6rIcR421eHrjXCSmD", "object": "tax.transaction", "created": 1670863656, "currency": "eur", ... "line_items": { "object": "list", "data": [ {

For each line item reversed, you must provide the amount and amount_tax reversed. The amount is tax-inclusive if the original calculation line item was tax-inclusive.

How amount and amount_tax are determined depends on your situation:

  • If your transactions always have a single line item, use full reversals instead.
  • If you always refund entire line items, use the original transaction line item amount and amount_tax, but with negative signs.
  • If you refund parts of line items, you must calculate the amounts refunded. For example, for a sale transaction with amount=5000 and amount_tax=500, after refunding half the line item, you create a partial reversal with line item amount=-2500 and amount_tax=-250.

Tax reports with partial refunds

If you refund a tax amount such that the total tax is no longer proportional to the subtotal, your tax reporting can be unreliable. It won’t automatically adjust the taxable and nontaxable amounts, and won’t reflect the reason for the tax reversal (such as product exempt, customer exempt, or reverse charge). We recommend not refunding partial line item tax amounts. Instead, void the transaction and create a new one with appropriate inputs for an accurate tax calculation.

Partially refund a sale by a flat amount

Alternatively, you can create a reversal with mode=partial by specifying a flat after-tax amount to refund. The amount distributes across each line item and shipping cost proportionally, depending on the remaining amount left to refund on each.

In the example below, the transaction has two line items: one 10 USD item and one 20 USD item, both taxed at 10%. The total amount of the transaction is 33.00 USD. A refund for a flat 16.50 USD is recorded:

Command Line
cURL
Stripe CLI
Ruby
Python
PHP
Java
Node.js
Go
.NET
No results
curl https://api.stripe.com/v1/tax/transactions/create_reversal \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -d mode=partial \ -d original_transaction=tax_1NVcKqBUZ691iUZ4xMZtcGYt \ -d reference=pi_234567890-refund_1 \ -d flat_amount=-1650 \ -d "metadata[refund]"=
"{{REFUND_ID}}"
\ --data-urlencode "metadata[refund_reason]"="Refunded $16.50 of pi_234567890 (customer was unhappy)" \ -d "expand[]"=line_items

This returns the partial reversal transaction that’s created:

{ "id": "tax_1NVcQYBUZ691iUZ4SBPukGa6", "object": "tax.transaction", "created": 1689780994, "currency": "usd", ... "line_items": { "object": "list", "data": [ {

For each line item and shipping cost in the original transaction, the refunded amounts and tax are calculated as follows:

  1. First, we calculate the total remaining funds in the transaction available to refund. Because this transaction hasn’t had any other reversals recorded, the total amount is 33.00 USD.
  2. Next, we calculate the total amount to refund for each line item. We base this calculation on the proportion of the item’s total available amount to refund versus the total remaining amount of the transaction. For example, the 10 USD item, which has 11.00 USD total remaining to refund, represents 33.33% of the transaction’s remaining total, so the total amount to refund is -16.50 USD * 33.33% = -5.50 USD.
  3. Finally, the total amount to refund is divided between amount and amount_tax. We also do this proportionally, depending on how much tax is available to refund in the line item compared to the total funds left to refund. Using the 10 USD item example, tax (1.00 USD) represents 9.09% of the total remaining to refund (11.00 USD), so the amount_tax is -5.50 USD * 9.09% = -0.50 USD.

The flat amount distributes according to what’s left to refund in the transaction, not what was originally recorded. For example, instead of recording a refund for a flat 16.50 USD, you first record a partial reversal for the total amount of the 10 USD item:

Command Line
cURL
Stripe CLI
Ruby
Python
PHP
Java
Node.js
Go
.NET
No results
curl https://api.stripe.com/v1/tax/transactions/create_reversal \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -d mode=partial \ -d original_transaction=tax_1NVcKqBUZ691iUZ4xMZtcGYt \ -d reference=pi_234567890-refund_1 \ -d "line_items[0][original_line_item]"=tax_li_OICmRXkFuWr8Df \ -d "line_items[0][reference]"=partial_refund_l1 \ -d "line_items[0][amount]"=-1000 \ -d "line_items[0][amount_tax]"=-100 \ -d "metadata[refund]"=
"{{REFUND_ID}}"
\ --data-urlencode "metadata[refund_reason]"="Refunded line 1 of pi_234567890 (customer was unhappy)" \ -d "expand[0]"=line_items

After this, you record a 16.50 USD flat amount reversal:

Command Line
cURL
Stripe CLI
Ruby
Python
PHP
Java
Node.js
Go
.NET
No results
curl https://api.stripe.com/v1/tax/transactions/create_reversal \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -d mode=partial \ -d original_transaction=tax_1NVcKqBUZ691iUZ4xMZtcGYt \ -d reference=pi_234567890-refund_2 \ -d flat_amount=-1650 \ -d "metadata[refund]"=
"{{REFUND_ID}}"
\ --data-urlencode "metadata[refund_reason]"="Refunded $16.50 of pi_234567890 (customer was still unhappy)" \ -d "expand[]"=line_items

This returns the partial reversal transaction:

{ "id": "tax_1NVxFIBUZ691iUZ4saOIloxB", "object": "tax.transaction", "created": 1689861020, "currency": "usd", ... "line_items": { "object": "list", "data": [ {

Because the total amount remaining in the transaction is now 22.00 USD and the 10 USD item is completely refunded, the 16.50 USD distributes entirely to the 20 USD item. The 16.50 USD then distributes, using the logic from step 3, into amount = -15.00 USD and amount_tax = -1.50 USD. Meanwhile, the 10 USD item in the transaction records a refund of 0 USD.

Undo a partial refund

Tax transactions are immutable, but you can cancel a partial refund by creating a full reversal.

You might need to do this when:

  • The payment refund fails and you haven’t provided the good or service to your customer
  • The wrong order is refunded or the wrong amounts are refunded
  • The original sale is fully refunded and the partial refunds are no longer valid

In the example below, tax_1MEFACI6rIcR421eHrjXCSmD is the transaction that represents the partial refund:

Command Line
cURL
Stripe CLI
Ruby
Python
PHP
Java
Node.js
Go
.NET
No results
curl https://api.stripe.com/v1/tax/transactions/create_reversal \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -d mode=full \ -d original_transaction=tax_1MEFACI6rIcR421eHrjXCSmD \ -d reference=pi_123456789-refund_1-cancel \ -d "metadata[refund_reason]"="User called to cancel because they selected the wrong item" \ -d "expand[]"=line_items

This returns the full reversal transaction that’s created:

{ "id": "tax_1MEFADI6rIcR421e94fNTOCK", "object": "tax.transaction", "created": 1670863657, "currency": "eur", ... "line_items": { "object": "list", "data": [ {

Testing

Use sandboxes, which is identical in response structure to live mode, to confirm your integration works correctly before going live.

Warning

In testing environments, calculations aren’t guaranteed to return up-to-date taxation results. You’re limited to 1,000 tax calculations per day. If you need a higher limit, contact Stripe support. For guidance on automated testing and strategies to avoid rate limits in testing environments, see Automated testing.

View tax transactions

You can view all tax transactions for your account on the Tax Transactions page in the Dashboard. Click an individual transaction to see a detailed breakdown of calculated tax by jurisdiction, and by the individual products included in the transaction.

Note

The Tax Transactions page only includes transactions and not calculations. If you expect to see a calculation and can’t find it on this page, verify that you successfully created a tax transaction from the calculation.

OptionalIntegration examples

OptionalCalculate tax on shipping costs
Server-side

OptionalEstimate taxes with an IP address
Server-side

OptionalCollect customer tax IDs
Server-side

OptionalTax-inclusive pricing
Server-side

OptionalUse an existing Product object
Server-side

OptionalUse an existing Customer object
Server-side

OptionalOverride customer taxability
Server-side

OptionalSpecify a ship-from location
Server-side

OptionalCalculate the retail delivery fee
Server-side

OptionalDetailed line item tax breakdowns
Server-side

OptionalTroubleshoot common errors
Server-side

Collect customer tax IDs

Displaying a customer’s tax ID and legal business name on invoices is a common requirement. You can use the Tax ID Element to collect this information. This feature is in public preview.

Disclaimer

The Payment Intents API is designed to collect business tax IDs, which might have formats similar to personal tax IDs in certain jurisdictions. You must make sure that only business tax IDs, as designated for this field, are provided when using this feature.

Enable the beta

The Tax ID Element with the Payment Intents API requires you to enable the elements_tax_id_1 beta. Add the beta to your Stripe.js initialization:

const stripe = Stripe(
'pk_test_TYooMQauvdEDq54NiTphI7jx'
, { betas: ['elements_tax_id_1'], });

Create a CustomerSession (optional)

If you want to save tax IDs to a Customer and redisplay them for returning customers, you need to create a CustomerSession. The CustomerSession provides secure, temporary access to customer data without exposing your secret API key to the client.

If you don’t use CustomerSession, the Tax ID Element still works but without save and redisplay functionality. You can use getValue to read the tax ID values from the element and handle them manually.

First, create or retrieve a Customer:

Command Line
cURL
Stripe CLI
Ruby
Python
PHP
Java
Node.js
Go
.NET
No results
curl https://api.stripe.com/v1/customers \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ --data-urlencode email="[email protected]" \ -d name="Jenny Rosen"

Create a CustomerSession with the Tax ID Element component enabled:

Command Line
cURL
Stripe CLI
Ruby
Python
PHP
Java
Node.js
Go
.NET
No results
curl https://api.stripe.com/v1/customer_sessions \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -d customer=
"{{CUSTOMER_ID}}"
\ -d "components[tax_id_element][enabled]"=true \ -d "components[tax_id_element][features][tax_id_redisplay]"=enabled \ -d "components[tax_id_element][features][tax_id_save]"=enabled

The CustomerSession returns a client_secret that you’ll pass to the client side.

Create a PaymentIntent or SetupIntent

Create a PaymentIntent or SetupIntent on your server. When using CustomerSession, include the customer parameter to enable tax ID save and redisplay functionality:

Command Line
cURL
Stripe CLI
Ruby
Python
PHP
Java
Node.js
Go
.NET
No results
curl https://api.stripe.com/v1/payment_intents \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -d amount=1099 \ -d currency=usd \ -d customer=
"{{CUSTOMER_ID}}"

Note

You don’t need to include any tax-ID-specific parameters when creating the PaymentIntent or SetupIntent. The Tax ID Element automatically handles tax ID collection and saves it to the Customer when a CustomerSession with the appropriate permissions is present.

Initialize Elements

Create an Elements instance using the clientSecret from your PaymentIntent or SetupIntent.

To enable saving tax IDs to a Customer and redisplaying them for returning customers, include the customerSessionClientSecret:

const stripe = Stripe(
'pk_test_TYooMQauvdEDq54NiTphI7jx'
, { betas: ['elements_tax_id_1'], }); // Fetch the clientSecret from your server const {clientSecret} = await fetch('/create-payment-intent', { method: 'POST', headers: { 'Content-Type': 'application/json' }, }).then((res) => res.json()); // Fetch the customerSessionClientSecret from your server const {customerSessionClientSecret} = await fetch('/create-customer-session', { method: 'POST', headers: { 'Content-Type': 'application/json' }, }).then((res) => res.json()); const elements = stripe.elements({ clientSecret, customerSessionClientSecret, appearance: { /* ... */ } });

Create and mount the Tax ID Element

Create an instance of the Tax ID Element and mount it to your page:

<form id="payment-form"> <div id="tax-id-element"> <!--Stripe.js injects the Tax ID Element--> </div> <button type="submit">Pay</button> </form>
const taxIdElement = elements.create('taxId', { visibility: 'auto', // 'auto' | 'always' | 'never' }); taxIdElement.mount('#tax-id-element');

You can customize the Tax ID Element with options such as visibility, fields, and validation. See Create a Tax ID Element for more details.

Use with Address Element (optional)

When you use the Tax ID Element with the Address Element, Stripe automatically determines the tax ID type and element visibility based on the customer’s address.

Complete the payment

When the customer submits the payment form, call confirmPayment or confirmSetup. Stripe automatically includes the tax ID information and saves it to the Customer if the payment succeeds:

const form = document.getElementById('payment-form'); form.addEventListener('submit', async (event) => { event.preventDefault(); const {error} = await stripe.confirmPayment({ elements, confirmParams: { return_url: 'https://example.com/order/complete', }, }); if (error) { // Handle error console.error(error.message); } // Customer gets redirected to return_url if successful });

You can also use getValue on the client side to read the tax ID values before submitting the payment.

Test your integration

In testing environments, you can enter any alphanumeric string that is in the correct format of a supported tax ID type (for example, DE123456789 for eu_vat). For a full list of example tax IDs you can reference our Customer Tax ID guide. You can also use our test tax IDs to test various verification state flows.

Tax ID validation

During payment or setup confirmation, Stripe verifies that the provided tax IDs are formatted correctly, but not that they’re valid. You’re responsible for ensuring the validity of customer information. To help, Stripe automatically performs asynchronous validation against government databases for European Value Added Tax (EU VAT) and United Kingdom Value Added Tax (GB VAT) numbers. Learn more about the validation we perform, and how to consume the status of those checks.

Supported Tax ID types

The Tax ID Element supports tax ID collection in the following countries and regions:

CountryEnumDescriptionExample
Impact in Tax Calculation
Albaniaal_tinAlbania Tax Identification NumberJ12345678NYes
Angolaao_tinAngola Tax Identification Number5123456789No
Armeniaam_tinArmenia Tax Identification Number02538904Yes
Arubaaw_tinAruba Tax Identification Number12345678Yes
Australiaau_abnAustralian Business Number (AU ABN)12345678912Yes
Austriaeu_vatEuropean VAT numberATU12345678Yes
Azerbaijanaz_tinAzerbaijan Tax Identification Number0123456789Yes
Bahamasbs_tinBahamas Tax Identification Number123.456.789No
Bahrainbh_vatBahraini VAT Number123456789012345Yes
Bangladeshbd_binBangladesh Business Identification Number123456789-0123Yes
Barbadosbb_tinBarbados Tax Identification Number1123456789012No
Belarusby_tinBelarus TIN Number123456789Yes
Belgiumeu_vatEuropean VAT numberBE0123456789Yes
Beninbj_ifuBenin Tax Identification Number (Identifiant Fiscal Unique)1234567890123Yes
Bosnia & Herzegovinaba_tinBosnia and Herzegovina Tax Identification Number123456789012Yes
Bulgariaeu_vatEuropean VAT numberBG0123456789Yes
Burkina Fasobf_ifuBurkina Faso Tax Identification Number (Numéro d'Identifiant Fiscal Unique)12345678AYes
Cambodiakh_tinCambodia Tax Identification Number1001-123456789Yes
Camerooncm_niuCameroon Tax Identification Number (Numéro d'Identifiant fiscal Unique)M123456789000LNo
Canadaca_bnCanadian BN123456789No
Canadaca_gst_hstCanadian GST/HST number123456789RT0002Yes
Canadaca_pst_bcCanadian PST number (British Columbia)PST-1234-5678No
Canadaca_pst_mbCanadian PST number (Manitoba)123456-7No
Canadaca_pst_skCanadian PST number (Saskatchewan)1234567No
Canadaca_qstCanadian QST number (Québec)1234567890TQ1234Yes
Cape Verdecv_nifCape Verde Tax Identification Number (Número de Identificação Fiscal)213456789No
Chilecl_tinChilean TIN12.345.678-KYes
Congo - Kinshasacd_nifCongo (DR) Tax Identification Number (Número de Identificação Fiscal)A0123456MNo
Costa Ricacr_tinCosta Rican tax ID1-234-567890No
Croatiaeu_vatEuropean VAT numberHR12345678912Yes
Cypruseu_vatEuropean VAT numberCY12345678ZYes
Czech Republiceu_vatEuropean VAT numberCZ1234567890Yes
Denmarkeu_vatEuropean VAT numberDK12345678Yes
Ecuadorec_rucEcuadorian RUC number1234567890001No
Egypteg_tinEgyptian Tax Identification Number123456789Yes
Estoniaeu_vatEuropean VAT numberEE123456789Yes
Ethiopiaet_tinEthiopia Tax Identification Number1234567890Yes
Finlandeu_vatEuropean VAT numberFI12345678Yes
Franceeu_vatEuropean VAT numberFRAB123456789Yes
Georgiage_vatGeorgian VAT123456789Yes
Germanyeu_vatEuropean VAT numberDE123456789Yes
Greeceeu_vatEuropean VAT numberEL123456789Yes
Guineagn_nifGuinea Tax Identification Number (Número de Identificação Fiscal)123456789Yes
Hungaryeu_vatEuropean VAT numberHU12345678Yes
Icelandis_vatIcelandic VAT123456Yes
Indiain_gstIndian GST number12ABCDE3456FGZHYes
Irelandeu_vatEuropean VAT numberIE1234567ABYes
Italyeu_vatEuropean VAT numberIT12345678912Yes
Kazakhstankz_binKazakhstani Business Identification Number123456789012Yes
Kenyake_pinKenya Revenue Authority Personal Identification NumberP000111111ANo
Kyrgyzstankg_tinKyrgyzstan Tax Identification Number12345678901234No
Laosla_tinLaos Tax Identification Number123456789-000No
Latviaeu_vatEuropean VAT numberLV12345678912Yes
Liechtensteinli_vatLiechtensteinian VAT number12345Yes
Lithuaniaeu_vatEuropean VAT numberLT123456789123Yes
Luxembourgeu_vatEuropean VAT numberLU12345678Yes
Maltaeu_vatEuropean VAT numberMT12345678Yes
Mauritaniamr_nifMauritania Tax Identification Number (Número de Identificação Fiscal)12345678No
Mexicomx_rfcMexican RFC numberABC010203AB9No
Moldovamd_vatMoldova VAT Number1234567Yes
Montenegrome_pibMontenegro PIB Number12345678No
Moroccoma_vatMorocco VAT Number12345678Yes
Nepalnp_panNepal PAN Number123456789Yes
Netherlandseu_vatEuropean VAT numberNL123456789B12Yes
New Zealandnz_gstNew Zealand GST number123456789Yes
Nigeriang_tinNigerian Tax Identification Number12345678-0001No
North Macedoniamk_vatNorth Macedonia VAT NumberMK1234567890123Yes
Norwayno_vatNorwegian VAT number123456789MVAYes
Omanom_vatOmani VAT NumberOM1234567890Yes
Perupe_rucPeruvian RUC number12345678901Yes
Philippinesph_tinPhilippines Tax Identification Number123456789012Yes
Polandeu_vatEuropean VAT numberPL1234567890Yes
Polandpl_nipPolish NIP number1234567890No
Portugaleu_vatEuropean VAT numberPT123456789Yes
Romaniaeu_vatEuropean VAT numberRO1234567891Yes
Russiaru_innRussian INN1234567891Yes
Russiaru_kppRussian KPP123456789Yes
Saudi Arabiasa_vatSaudi Arabia VAT123456789012345Yes
Senegalsn_nineaSenegal NINEA Number12345672A2No
Serbiars_pibSerbian PIB number123456789No
Singaporesg_gstSingaporean GSTM12345678XYes
Slovakiaeu_vatEuropean VAT numberSK1234567891Yes
Sloveniaeu_vatEuropean VAT numberSI12345678Yes
South Africaza_vatSouth African VAT number4123456789Yes
South Koreakr_brnKorean BRN123-45-67890Yes
Spaines_cifSpanish NIF number (previously Spanish CIF number)A12345678No
Spaineu_vatEuropean VAT numberESA1234567ZYes
Surinamesr_finSuriname FIN Number1234567890Yes
Swedeneu_vatEuropean VAT numberSE123456789123Yes
Switzerlandch_vatSwitzerland VAT numberCHE-123.456.789 MWSTYes
Taiwantw_vatTaiwanese VAT12345678Yes
Tajikistantj_tinTajikistan Tax Identification Number123456789Yes
Tanzaniatz_vatTanzania VAT Number12345678AYes
Thailandth_vatThai VAT1234567891234Yes
Turkeytr_tinTurkish Tax Identification Number0123456789Yes
Ugandaug_tinUganda Tax Identification Number1014751879Yes
Ukraineua_vatUkrainian VAT123456789Yes
United Arab Emiratesae_trnUnited Arab Emirates TRN123456789012345Yes
United Kingdomeu_vatNorthern Ireland VAT numberXI123456789Yes
United Kingdomgb_vatUnited Kingdom VAT numberGB123456789Yes
Uruguayuy_rucUruguayan RUC number123456789012Yes
Uzbekistanuz_tinUzbekistan TIN Number123456789No
Uzbekistanuz_vatUzbekistan VAT Number123456789012Yes
Zambiazm_tinZambia Tax Identification Number1004751879No
Zimbabwezw_tinZimbabwe Tax Identification Number1234567890No

Use tax IDs in calculations (optional)

In some cases, such as the cross-border supply of services, your customer might need to account for tax on a reverse charge basis. Instead of collecting the tax, you must issue an invoice with the text, “Tax to be paid on reverse charge basis.”

When you provide your customer’s tax IDs to Stripe Tax, we automatically determine when reverse charge applies:

Command Line
cURL
Stripe CLI
Ruby
Python
PHP
Java
Node.js
Go
.NET
No results
curl https://api.stripe.com/v1/tax/calculations \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -d currency=usd \ -d "line_items[0][amount]"=1000 \ -d "line_items[0][reference]"=L1 \ -d "customer_details[address][country]"=IE \ -d "customer_details[address_source]"=billing \ -d "customer_details[tax_ids][0][type]"=eu_vat \ -d "customer_details[tax_ids][0][value]"=DE123456789

If you provide a tax ID with an invalid format, the calculation returns a tax_id_invalid error code.

See also

  • Use Stripe Tax with Connect
Was this page helpful?
YesNo
  • Need help? Contact Support.
  • Check out our changelog.
  • Questions? Contact Sales.
  • LLM? Read llms.txt.
  • Powered by Markdoc