Skip to content
Sign in
An image of the Stripe logo
/
Create account
Sign in
Home
Payments
Finance automation
Banking as a service
Developer tools
No-code
All products
Home
Payments
Finance automation
Home
Payments
Finance automation
Banking as a service
Developer tools
Overview
Get started
About Stripe payments
Start an integration
Payment Links
Checkout
    Overview
    How Checkout works
    Quickstart
    Fulfill your orders
    Migrate payment methods to the Dashboard
    Migrate from legacy Checkout
    Migrate Checkout to use Prices
    Customize your integration
    Customize branding
    Collect taxes
    Collect tax IDs
    Collect phone numbers
    Make line item quantities adjustable
    Add custom fields
    Let customers decide what to pay
    Limit customers to one subscription
    Let customers complete orders for free
    Boost revenue
    Present local currencies
    Configure subscription upsells
    Configure cross-sells
    Recover abandoned carts
    Collect consent for promotional emails
    Analyze conversion funnel
    Additional features
    Add discounts
    Start a free trial without collecting payment details
    Set billing cycle date
    Manage limited inventory
    Guest customers
Web Elements
Mobile Elements
Payment scenarios
During the payment
After the payment
Add payment methods
More payment scenarios
Faster checkout with Link
Other Stripe products
Connect
Terminal
Radar
Financial Connections
Crypto
Identity
Climate
Resources
About the APIs
Implementation guides
Regulation support
Testing
Checkout
·
HomePayments

Collect Customer Tax IDs with Checkout

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

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. You can enable tax ID collection on all payment and subscription mode Sessions (tax ID collection isn’t supported in setup mode). This guide assumes that you’ve already integrated Checkout. If you haven’t, see the guide.

Supported Tax ID types

Checkout collects the following tax ID types in the given regions:

CountryEnumDescriptionExample
Australiaau_abnAustralian Business Number (AU ABN)12345678912
Austriaeu_vatEuropean VAT numberATU12345678
Belgiumeu_vatEuropean VAT numberBE0123456789
Bulgariaeu_vatEuropean VAT numberBG0123456789
Canadaca_bnCanadian BN123456789
Canadaca_gst_hstCanadian GST/HST number123456789RT0002
Canadaca_pst_bcCanadian PST number (British Columbia)PST-1234-5678
Canadaca_pst_mbCanadian PST number (Manitoba)123456-7
Canadaca_pst_skCanadian PST number (Saskatchewan)1234567
Canadaca_qstCanadian QST number (Québec)1234567890TQ1234
Chilecl_tinChilean TIN12.345.678-K
Croatiaeu_vatEuropean VAT numberHR12345678912
Cypruseu_vatEuropean VAT numberCY12345678Z
Czech Republiceu_vatEuropean VAT numberCZ1234567890
Denmarkeu_vatEuropean VAT numberDK12345678
Estoniaeu_vatEuropean VAT numberEE123456789
Finlandeu_vatEuropean VAT numberFI12345678
Franceeu_vatEuropean VAT numberFRAB123456789
Germanyeu_vatEuropean VAT numberDE123456789
Greeceeu_vatEuropean VAT numberEL123456789
Hungaryeu_vatEuropean VAT numberHU12345678
Icelandis_vatIcelandic VAT123456
Indiain_gstIndian GST number12ABCDE3456FGZH
Irelandeu_vatEuropean VAT numberIE1234567AB
Italyeu_vatEuropean VAT numberIT12345678912
Japanjp_cnJapanese Corporate Number (*Hōjin Bangō*)1234567891234
Latviaeu_vatEuropean VAT numberLV12345678912
Lithuaniaeu_vatEuropean VAT numberLT123456789123
Luxembourgeu_vatEuropean VAT numberLU12345678
Maltaeu_vatEuropean VAT numberMT12345678
Mexicomx_rfcMexican RFC numberABC010203AB9
Netherlandseu_vatEuropean VAT numberNL123456789B12
New Zealandnz_gstNew Zealand GST number123456789
Norwayno_vatNorwegian VAT number123456789MVA
Polandeu_vatEuropean VAT numberPL1234567890
Portugaleu_vatEuropean VAT numberPT123456789
Romaniaeu_vatEuropean VAT numberRO1234567891
Russiaru_innRussian INN1234567891
Russiaru_kppRussian KPP123456789
Saudi Arabiasa_vatSaudi Arabia VAT123456789012345
Singaporesg_gstSingaporean GSTM12345678X
Slovakiaeu_vatEuropean VAT numberSK1234567891
Sloveniaeu_vatEuropean VAT numberSI12345678
South Africaza_vatSouth African VAT number4123456789
South Koreakr_brnKorean BRN123-45-67890
Spaines_cifSpanish NIF number (previously Spanish CIF number)A12345678
Spaineu_vatEuropean VAT numberESA1234567Z
Swedeneu_vatEuropean VAT numberSE123456789123
Switzerlandch_vatSwitzerland VAT numberCHE-123.456.789 MWST
Thailandth_vatThai VAT1234567891234
Turkeytr_tinTurkish Tax Identification Number0123456789
United Arab Emiratesae_trnUnited Arab Emirates TRN123456789012345
United Kingdomeu_vatNorthern Ireland VAT numberXI123456789
United Kingdomgb_vatUnited Kingdom VAT numberGB123456789

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 their business’s tax ID and their business’s legal entity name. 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 https://api.stripe.com/v1/checkout/sessions \ -u
sk_test_4eC39HqLyjWDarjtT1zdp7dc
:
\ -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 \ -d success_url="https://example.com/success" \ -d cancel_url="https://example.com/cancel"

Note

The above code example creates a Session in payment mode with tax ID collection enabled. To enable tax ID collection in subscription mode you would make the same changes highlighted in green to your subscription mode Session creation request.

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 Customer’s that don’t already have an existing tax ID. If a Customer has one or more tax IDs saved, Checkout does not display the tax ID collection form even if tax ID collection is enabled.

When collecting tax IDs for existing customers you can choose to 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 https://api.stripe.com/v1/checkout/sessions \ -u
sk_test_4eC39HqLyjWDarjtT1zdp7dc
:
\ -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 mode=payment \ -d success_url="https://example.com/success" \ -d cancel_url="https://example.com/cancel"

If you don’t have the addresses of your existing customers saved, you can choose to 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.

Note

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 https://api.stripe.com/v1/checkout/sessions \ -u
sk_test_4eC39HqLyjWDarjtT1zdp7dc
:
\ -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[address]"="auto" \ -d mode=payment \ -d success_url="https://example.com/success" \ -d 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.

Note

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 https://api.stripe.com/v1/checkout/sessions \ -u "
sk_test_4eC39HqLyjWDarjtT1zdp7dc
:"
\ -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"

Note

The above code examples create Sessions in payment mode with tax ID collection enabled. To enable tax ID collection in subscription mode you would make the same changes highlighted in green to your subscription mode Session creation request.

Retrieving 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 wish 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": [ {

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 Customer Tax IDs resource. 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.

Testing your integration

In test mode 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: test business tax IDs.

Validation

Checkout performs checks during the Session to ensure that provided tax IDs are formatted correctly. We don’t verify that provided tax IDs are valid during the Session. You’re responsible for ensuring the validity of customer information collected during Checkout. To help, Stripe automatically performs asynchronous validation against government databases for Australian Business (ABN) numbers, European Value-Added-Tax (EU VAT) numbers, and United Kingdom Value-Added-Tax (GB VAT) numbers. You can read more on the validation we perform, and how to consume the status of those checks in our Customer Tax ID guide.

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
Supported Tax ID types
Enable Tax ID collection
Retrieving Customer Tax ID details after a Session
Testing your integration
Validation
Products Used
Tax
Checkout
Stripe Shell
Test mode
Welcome to the Stripe Shell! Stripe Shell is a browser-based shell with the Stripe CLI pre-installed. Log in 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.
$