Stripe | Financial Infrastructure to Grow Your Revenue

Stripe | Financial Infrastructure to Grow Your Revenue

5282 articles

Collect customer tax IDs with Checkout


Collect customer tax IDs with Checkout

Learn how to collect VAT and other customer Tax IDs during 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. Tax ID Collection works with all Checkout Integration types: the hosted page, embedded page and elements mode.

Business tax IDs only

The Checkout Sessions API only collects 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 tax ID collection Server-side

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 displays fields for them to enter the Tax ID and legal entity name for their business. If available, Checkout uses the customer’s shipping address to determine their location, otherwise it uses the 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

Select a language

cURL

Stripe CLI

Ruby

Python

PHP

Java

Node.js

Go

.NET

No results

You can additionally configure Checkout to create a new customer-configured Account or Customer for you using customer_creation. If you do, Checkout saves any Tax ID information collected during a session to that new Account or Customer. If not, the Tax ID information is still available at customer_details.tax_ids.

Existing customers

Create a Checkout Session with an existing customer to add any tax ID information collected during checkout. If the customer doesn’t have an existing tax ID, Checkout collects one. If the customer has one or more saved tax IDs, Checkout doesn’t display the tax ID collection form even if tax ID collection is enabled.

When creating the Checkout Session, set customer_update.name to auto to automatically update the customer’s name using details from the session.

If you don’t have saved addresses for existing customers, use the billing or shipping address entered during Checkout to assess their location. The following table describes the available options:

ParameterBehaviour
customer_update.address = autoUses the billing address entered during Checkout. Replaces the customer’s previously saved addresses.
customer_update.shipping = autoUses the shipping address entered during Checkout. Replaces the customer’s previously saved shipping addresses. Requires shipping_address_collection.

Create a Checkout Session with an existing v2 Account to add any tax ID information collected during checkout. The Checkout Session saves the business name to the identity object and saves the collected tax ID as a Tax ID resource associated with the account.

Command Line

Select a language

cURL

Stripe CLI

Ruby

Python

PHP

Java

Node.js

Go

.NET

No results

Optional Require tax ID collection

Optional Collect Tax IDs in the payment form

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": __TOKEN_PLACEHOLDER_0__,
 "customer_details": {
 ...
 "tax_ids": [
 {
 "type": "eu_vat",
 "value": "FRAB123456789"
 }
 ]
 },
 ...
 "tax_id_collection": {
 "enabled": true
 }
 ...
 }
}

Checkout saves collected tax IDs and business names to the Customer object when you associate the Checkout Session with a Customer. Checkout stores a collected tax ID under the customer.tax_ids array on the Customer. You can retrieve all tax IDs saved to a Customer with the Tax IDs resource by setting owner.type to customer and owner.customer to the customer ID. Checkout saves the business name to the Customer’s name and business_name properties. Your subscription invoices always show the collected legal business name.

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, the related setting 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.

Stripe automatically performs asynchronous validation against government databases for Australian Business Numbers (ABNs), European Value Added Tax (EU VAT), and United Kingdom Value Added Tax (GB VAT) numbers.

Stripe sends an event when verification finishes for a tax ID saved to either of these objects:

  • For a Customer , listen for the customer.tax_id.updated snapshot event. Inspect data.object.verification.status in the event.
  • For a customer-configured Account , listen for the v1.customer.tax_id.updated thin event. Retrieve the Tax ID referenced by related _ object , then inspect its verification.status .

The status is pending, verified, unverified, or unavailable.

The checkout.session.completed event can arrive before the authority verification finishes. Stripe sends the applicable tax ID update event only when Checkout saves the tax ID to a Customer or customer-configured Account. For Guest customers, customer_details.tax_ids contains the collected tax ID type and value, but not a verification result, and Stripe doesn’t send a tax ID update event. To receive the result, save the tax ID to a Customer or customer-configured Account. Otherwise, verify the tax ID independently.

Stripe reports the verification result, and you’re responsible for determining how to handle an unverified tax ID, based on your own compliance requirements. When automatic validation is unavailable, you must manually verify the tax ID.

If you use Stripe Tax, Stripe Tax applies the reverse charge or zero rate according to applicable laws when the tax ID has the required number format, regardless of the government verification result.

Supported tax ID types

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

CountryEnumDescriptionExampleImpact 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
Hungaryhu_tinHungary tax number (adószám)12345678-1-23No
Icelandis_vatIcelandic VAT123456Yes
Indiain_gstIndian GST number12ABCDE3456FGZHYes
Indonesiaid_npwpIndonesian the related setting number012.345.678.9-012.345No
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 Number1234567890123No
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 the related setting 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
Sri Lankalk_vatSri Lanka VAT number123456789-1234Yes
Surinamesr_finSuriname FIN Number1234567890Yes
Swedeneu_vatEuropean VAT numberSE123456789123Yes
Switzerlandch_vatSwitzerland VAT number_CHE-123.456.789 the related settingYes
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
Vietnamvn_tinVietnamese tax ID number1234567890No
Zambiazm_tinZambia Tax Identification Number1004751879No
Zimbabwezw_tinZimbabwe Tax Identification Number1234567890No

See also

Last verified 2026-09-25

Is this helpful?