Skip to content
Create account
or
Sign in
The Stripe Docs logo
/
Ask AI
Create account
Sign in
Get started
Payments
Finance automation
Platforms and marketplaces
Money management
Developer tools
Get started
Payments
Finance automation
Get started
Payments
Finance automation
Platforms and marketplaces
Money management
Overview
About Stripe payments
Upgrade your integration
Payments analytics
Online payments
OverviewFind your use caseManaged Payments
Use Payment Links
Build a checkout page
    Overview
    Quickstarts
    Customize look and feel
    Collect additional information
    Collect taxes
      Use manual tax rates
      Collect tax IDs
    Dynamically update checkout
    Manage your product catalog
    Subscriptions
    Manage payment methods
    Let customers pay in their local currency
    Add discounts, upsells, and optional items
    Set up future payments
    Save payment details during payment
    Manually approve payments on your server
    After the payment
    Elements with Checkout Sessions API beta changelog
    Migrate from legacy Checkout
    Migrate Checkout to use Prices
Build an advanced integration
Build an in-app integration
Payment methods
Add payment methods
Manage payment methods
Faster checkout with Link
Payment interfaces
Payment Links
Checkout
Web Elements
In-app Elements
Payment scenarios
Custom payment flows
Flexible acquiring
Orchestration
In-person payments
Terminal
Other Stripe products
Financial Connections
Crypto
Climate
HomePaymentsBuild a checkout pageCollect taxes

Collect customer tax IDs with Checkout

Learn how to collect VAT and other customer tax IDs with Checkout.

Copy page

Displaying a customer’s tax ID and legal business name on invoices is a common requirement that you can satisfy by enabling tax ID collection in Checkout. This guide assumes that you’ve already integrated Checkout. If you haven’t, see the Accept a payment guide.

Enable Tax ID collection

With tax ID collection enabled, Checkout shows and hides the tax ID collection form depending on your customer’s location. If your customer is in a location supported by tax ID collection, Checkout shows a checkbox allowing the customer to indicate that they’re purchasing as a business. When a customer checks the box, Checkout displays fields for them to enter the tax ID and legal entity name for the business. If available, Checkout uses the customer’s shipping address to determine their location, otherwise Checkout uses the customer’s billing address. Customers can only enter one tax ID.

New Customers

To enable tax ID collection for new customers, set tax_id_collection[enabled] to true when creating a Checkout session.

Command Line
cURL
curl https://api.stripe.com/v1/checkout/sessions \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -d "line_items[0][price_data][unit_amount]"=1000 \ -d "line_items[0][price_data][product_data][name]"=T-shirt \ -d "line_items[0][price_data][currency]"=eur \ -d "line_items[0][quantity]"=2 \ -d "tax_id_collection[enabled]"=true \ -d mode=payment \ --data-urlencode success_url="https://example.com/success" \ --data-urlencode cancel_url="https://example.com/cancel"

This example creates a Session in payment mode with tax ID collection enabled. For subscriptions, make the same changes with the mode set to subscription.

You can additionally configure Checkout to create a new Customer for you using customer_creation. If you do, Checkout saves any tax ID information collected during a Session to that new Customer. If not, the tax ID information will still be available at customer_details.tax_ids.

Existing Customers

If you pass an existing Customer when creating a Session, Checkout updates the Customer with any tax ID information collected during the Session. Checkout saves the collected business name onto the Customer’s name property, and adds the collected tax ID to the Customer’s customer.tax_ids array. Since the collection of a business name could result in the Customer’s existing name being overridden, you must set customer_update.name to auto when creating the Session.

Caution

Checkout only collects tax IDs on Customers that don’t already have an existing tax ID. If a Customer has one or more tax IDs saved, Checkout doesn’t display the tax ID collection form even if tax ID collection is enabled.

When collecting tax IDs for existing customers you can either base their location on existing addresses on the customer or the addresses entered during checkout. By default, Checkout looks for existing addresses on the customer to assess their location:

Command Line
cURL
curl https://api.stripe.com/v1/checkout/sessions \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -d customer=
{{CUSTOMER_ID}}
\ -d "line_items[0][price_data][unit_amount]"=1000 \ -d "line_items[0][price_data][product_data][name]"=T-shirt \ -d "line_items[0][price_data][currency]"=eur \ -d "line_items[0][quantity]"=2 \ -d "tax_id_collection[enabled]"=true \ -d "customer_update[name]"=auto \ -d mode=payment \ --data-urlencode success_url="https://example.com/success" \ --data-urlencode cancel_url="https://example.com/cancel"

If you don’t have the addresses of your existing customers saved, you can base their location on the billing or shipping address entered during Checkout. To specify that you want to use the billing address entered during Checkout to assess the customer’s location, you must set customer_update.address to auto. When setting customer_update.address to auto, Checkout replaces any previously saved addresses on the customer with the address entered during the session.

Command Line
cURL
curl https://api.stripe.com/v1/checkout/sessions \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -d customer=
{{CUSTOMER_ID}}
\ -d "line_items[0][price_data][unit_amount]"=1000 \ -d "line_items[0][price_data][product_data][name]"=T-shirt \ -d "line_items[0][price_data][currency]"=eur \ -d "line_items[0][quantity]"=2 \ -d "tax_id_collection[enabled]"=true \ -d "customer_update[name]"=auto \ -d "customer_update[address]"=auto \ -d mode=payment \ --data-urlencode success_url="https://example.com/success" \ --data-urlencode cancel_url="https://example.com/cancel"

If you’re collecting shipping addresses for existing customers, you must base their location on the shipping address entered during checkout. To do so, set customer_update.shipping to auto. When setting customer_update.shipping to auto, Checkout replaces any previously saved shipping addresses on the customer with the shipping address entered during the session.

Command Line
cURL
curl https://api.stripe.com/v1/checkout/sessions \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -d customer=cus_HQmikpKnGHkNwW \ -d "line_items[0][price_data][unit_amount]"=1000 \ -d "line_items[0][price_data][product_data][name]"=T-shirt \ -d "line_items[0][price_data][currency]"=eur \ -d "line_items[0][quantity]"=2 \ -d "tax_id_collection[enabled]"=true \ -d "customer_update[name]"=auto \ -d "customer_update[shipping]"=auto \ -d "shipping_address_collection[allowed_countries][0]"=DE \ -d mode=payment \ --data-urlencode success_url="https://example.com/success" \ --data-urlencode cancel_url="https://example.com/cancel"

The above code example creates a Session in payment mode with tax ID collection enabled. For subscriptions, make the same changes with the mode set to subscription.

OptionalRequire tax ID collection

Retrieve Customer Tax ID details after a Session

Checkout includes provided tax IDs on the resulting Session object. After each completed Session, Checkout emits a checkout.session.completed event that you can listen for in a webhook endpoint. If you want to retrieve the collected tax ID from the Session object, it’s available under the Session’s customer_details.tax_ids array:

{ "object": { "id": "cs_test_a1dJwt0TCJTBsDkbK7RcoyJ91vJxe2Y", "object": "checkout.session", ... "customer": "cus_id_of_new_customer", "customer_details": { ... "tax_ids": [ { "type": "eu_vat", "value": "FRAB123456789" } ] }, ... "tax_id_collection": { "enabled": true }, ... } }

Checkout also saves collected tax IDs and business names to the Customer object if one is associated with the Session. A tax ID collected during checkout is accessible under the Customer’s customer.tax_ids array. You can also retrieve all tax IDs saved to a Customer with the Tax IDs resource by specifying the owner.type parameter to customer and owner.customer to the Customer’s ID. Every new tax ID includes an associated legal business name, which Checkout saves to the Customer’s name property. In doing so, the collected legal business name is always visible on any subscription invoices for that Customer.

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.

Validation

During the Checkout Session, 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 collected during checkout. 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.

If you use Stripe Tax and your customer provides a tax ID, Stripe Tax applies the reverse charge or zero rate according to applicable laws, as long as the tax ID conforms to the necessary number format, regardless of its validity.

Supported Tax ID types

Checkout collects the following tax ID types in the given 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
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
Was this page helpful?
YesNo
Need help? Contact Support.
Join our early access program.
Check out our changelog.
Questions? Contact Sales.
LLM? Read llms.txt.
Powered by Markdoc