# Collect customer tax IDs Use the Tax ID Element to collect business tax IDs from customers in your PaymentIntents integration. ## Collect customer tax IDs Displaying a customer’s tax ID and legal business name on *invoices* (Invoices are statements of amounts owed by a customer. They track the status of payments from draft through paid or otherwise finalized. Subscriptions automatically generate invoices, or you can manually create a one-off invoice) is a common requirement. You can use the [Tax ID Element](https://docs.stripe.com/elements/tax-id-element.md) to collect this information. This feature is in [public preview](https://docs.stripe.com/release-phases.md). > #### 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: ```javascript const stripe = Stripe('<>', { betas: ['elements_tax_id_1'], }); ``` ### Create a CustomerSession (optional) To save tax IDs and redisplay them for returning customers, create a [CustomerSession](https://docs.stripe.com/api/customer_sessions.md), which 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](https://docs.stripe.com/js/elements_object/get_value_tax_id_element) to read the tax ID values from the element and handle them manually. #### Customer v1 Create or retrieve a *Customer* (Customer objects represent customers of your business. They let you reuse payment methods and give you the ability to track multiple payments): ```curl curl https://api.stripe.com/v1/customers \ -u "<>:" \ --data-urlencode "email=customer@example.com" \ -d "name=Jenny Rosen" ``` Create a `CustomerSession` with the Tax ID Element component enabled: ```curl curl https://api.stripe.com/v1/customer_sessions \ -u "<>:" \ -H "Stripe-Version: 2026-04-22.preview" \ -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](https://docs.stripe.com/api/payment_intents.md) or [SetupIntent](https://docs.stripe.com/api/setup_intents.md) on your server. When using `CustomerSession`, include the customer reference parameter to enable tax ID save and redisplay functionality: #### Customer v1 ```curl curl https://api.stripe.com/v1/payment_intents \ -u "<>:" \ -d amount=1099 \ -d currency=usd \ -d "customer={{CUSTOMER_ID}}" ``` > You don’t need to include any tax-ID-specific parameters when creating the Payment Intent or Setup Intent. The Tax ID Element automatically handles tax ID collection and saves it to the *Customer* (Customer objects represent customers of your business. They let you reuse payment methods and give you the ability to track multiple payments) when using a Customer Session with the appropriate permissions. ### 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`: ```javascript const stripe = Stripe('<>', { 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: ```html
``` ```javascript 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](https://docs.stripe.com/js/elements_object/create_tax_id_element) for more details. ### Use with Address Element (optional) When you use the Tax ID Element with the [Address Element](https://docs.stripe.com/elements/address-element.md), 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](https://docs.stripe.com/js/payment_intents/confirm_payment) or [confirmSetup](https://docs.stripe.com/js/setup_intents/confirm_setup). Stripe automatically includes the tax ID information and saves it to the Customer if the payment succeeds: ```javascript 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](https://docs.stripe.com/js/elements_object/get_value_tax_id_element) 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](https://docs.stripe.com/billing/customer/tax-ids.md#supported-tax-id). You can also use our [test tax IDs](https://docs.stripe.com/connect/testing.md#test-business-tax-ids) to test various verification state flows. ### Asynchronous 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 [Australian Business Numbers (ABNs)](https://docs.stripe.com/tax/invoicing/tax-ids.md#australian-business-numbers-abn), [European Value Added Tax](https://docs.stripe.com/tax/invoicing/tax-ids.md#european-value-added-tax-eu-vat-numbers) (EU VAT), and [United Kingdom Value Added Tax](https://docs.stripe.com/tax/invoicing/tax-ids.md#united-kingdom-value-added-tax-gb-vat-numbers) (GB VAT) numbers. Learn more about the [validation we perform](https://docs.stripe.com/tax/invoicing/tax-ids.md#validation), and how to consume the status of those checks. ### Real-time tax ID validation (Preview) In addition to the asynchronous validation described above, you can enable synchronous, real-time tax ID verification directly in the Tax ID Element. When you enable it, Stripe verifies tax IDs against government databases as your customer types and displays the result inline before they submit the payment. Stripe currently supports real-time verification for [Australian Business Numbers (ABNs)](https://docs.stripe.com/tax/invoicing/tax-ids.md#australian-business-numbers-abn), [European Value Added Tax (EU VAT)](https://docs.stripe.com/tax/invoicing/tax-ids.md#european-value-added-tax-eu-vat-numbers), and [United Kingdom Value Added Tax (GB VAT)](https://docs.stripe.com/tax/invoicing/tax-ids.md#united-kingdom-value-added-tax-gb-vat-numbers) numbers. If a government database is unavailable, Stripe falls back to synchronous format validation and performs full verification asynchronously. This feature is in [public preview](https://docs.stripe.com/release-phases.md) and requires the `elements_tax_id_verification_1` beta. ```javascript const taxIdElement = elements.create('taxId', { ... verification: { taxId: { mode: 'if_supported', }, }, }); ``` When you enable verification, the `change` event includes the `verification.taxId.status` field. Its value can be `pending`, `verified`, `unverified`, or `unavailable`. The element’s `complete` status reflects the verification result. See [Create a Tax ID Element](https://docs.stripe.com/js/elements_object/create_tax_id_element#tax_id_element_create-options-verification) and [Tax ID Element on Change](https://docs.stripe.com/js/element/events/on_change?type=taxIdElement#element_on_change-handler-verification) for details. ### Supported Tax ID types The Tax ID Element supports tax ID collection in the following countries and regions: | Country | Enum | Description | Example | Impact in Tax Calculation* | | ------- | ---------- | --------------------------------------------------------------------------- | -------------------- | -------------------------- | | AE | ae_trn | United Arab Emirates TRN | 123456789012345 | Yes | | AL | al_tin | Albania Tax Identification Number | J12345678N | Yes | | AM | am_tin | Armenia Tax Identification Number | 02538904 | Yes | | AO | ao_tin | Angola Tax Identification Number | 5123456789 | No | | AT | eu_vat | European VAT number | ATU12345678 | Yes | | AU | au_abn | Australian Business Number (AU ABN) | 12345678912 | Yes | | AW | aw_tin | Aruba Tax Identification Number | 12345678 | Yes | | AZ | az_tin | Azerbaijan Tax Identification Number | 0123456789 | Yes | | BA | ba_tin | Bosnia and Herzegovina Tax Identification Number | 123456789012 | Yes | | BB | bb_tin | Barbados Tax Identification Number | 1123456789012 | No | | BD | bd_bin | Bangladesh Business Identification Number | 123456789-0123 | Yes | | BE | eu_vat | European VAT number | BE0123456789 | Yes | | BF | bf_ifu | Burkina Faso Tax Identification Number (Numéro d'Identifiant Fiscal Unique) | 12345678A | Yes | | BG | eu_vat | European VAT number | BG0123456789 | Yes | | BH | bh_vat | Bahraini VAT Number | 123456789012345 | Yes | | BJ | bj_ifu | Benin Tax Identification Number (Identifiant Fiscal Unique) | 1234567890123 | Yes | | BS | bs_tin | Bahamas Tax Identification Number | 123.456.789 | No | | BY | by_tin | Belarus TIN Number | 123456789 | Yes | | CA | ca_bn | Canadian BN | 123456789 | No | | CA | ca_gst_hst | Canadian GST/HST number | 123456789RT0002 | Yes | | CA | ca_pst_bc | Canadian PST number (British Columbia) | PST-1234-5678 | No | | CA | ca_pst_mb | Canadian PST number (Manitoba) | 123456-7 | No | | CA | ca_pst_sk | Canadian PST number (Saskatchewan) | 1234567 | No | | CA | ca_qst | Canadian QST number (Québec) | 1234567890TQ1234 | Yes | | CD | cd_nif | Congo (DR) Tax Identification Number (Número de Identificação Fiscal) | A0123456M | No | | CH | ch_vat | Switzerland VAT number | CHE-123.456.789 MWST | Yes | | CL | cl_tin | Chilean TIN | 12.345.678-K | Yes | | CM | cm_niu | Cameroon Tax Identification Number (Numéro d'Identifiant fiscal Unique) | M123456789000L | No | | CR | cr_tin | Costa Rican tax ID | 1-234-567890 | No | | CV | cv_nif | Cape Verde Tax Identification Number (Número de Identificação Fiscal) | 213456789 | No | | CY | eu_vat | European VAT number | CY12345678Z | Yes | | CZ | eu_vat | European VAT number | CZ1234567890 | Yes | | DE | eu_vat | European VAT number | DE123456789 | Yes | | DK | eu_vat | European VAT number | DK12345678 | Yes | | EC | ec_ruc | Ecuadorian RUC number | 1234567890001 | No | | EE | eu_vat | European VAT number | EE123456789 | Yes | | EG | eg_tin | Egyptian Tax Identification Number | 123456789 | Yes | | ES | es_cif | Spanish NIF number (previously Spanish CIF number) | A12345678 | No | | ES | eu_vat | European VAT number | ESA1234567Z | Yes | | ET | et_tin | Ethiopia Tax Identification Number | 1234567890 | Yes | | FI | eu_vat | European VAT number | FI12345678 | Yes | | FR | eu_vat | European VAT number | FRAB123456789 | Yes | | GB | eu_vat | Northern Ireland VAT number | XI123456789 | Yes | | GB | gb_vat | United Kingdom VAT number | GB123456789 | Yes | | GE | ge_vat | Georgian VAT | 123456789 | Yes | | GN | gn_nif | Guinea Tax Identification Number (Número de Identificação Fiscal) | 123456789 | Yes | | GR | eu_vat | European VAT number | EL123456789 | Yes | | HR | eu_vat | European VAT number | HR12345678912 | Yes | | HU | eu_vat | European VAT number | HU12345678 | Yes | | HU | hu_tin | Hungary tax number (adószám) | 12345678-1-23 | No | | IE | eu_vat | European VAT number | IE1234567AB | Yes | | IN | in_gst | Indian GST number | 12ABCDE3456FGZH | Yes | | IS | is_vat | Icelandic VAT | 123456 | Yes | | IT | eu_vat | European VAT number | IT12345678912 | Yes | | KE | ke_pin | Kenya Revenue Authority Personal Identification Number | P000111111A | No | | KG | kg_tin | Kyrgyzstan Tax Identification Number | 12345678901234 | No | | KH | kh_tin | Cambodia Tax Identification Number | 1001-123456789 | Yes | | KR | kr_brn | Korean BRN | 123-45-67890 | Yes | | KZ | kz_bin | Kazakhstani Business Identification Number | 123456789012 | Yes | | LA | la_tin | Laos Tax Identification Number | 123456789-000 | No | | LI | li_vat | Liechtensteinian VAT number | 12345 | Yes | | LK | lk_vat | Sri Lanka VAT number | 123456789-1234 | Yes | | LT | eu_vat | European VAT number | LT123456789123 | Yes | | LU | eu_vat | European VAT number | LU12345678 | Yes | | LV | eu_vat | European VAT number | LV12345678912 | Yes | | MA | ma_vat | Morocco VAT Number | 12345678 | Yes | | MD | md_vat | Moldova VAT Number | 1234567 | Yes | | ME | me_pib | Montenegro PIB Number | 12345678 | No | | MK | mk_vat | North Macedonia VAT Number | MK1234567890123 | Yes | | MR | mr_nif | Mauritania Tax Identification Number (Número de Identificação Fiscal) | 12345678 | No | | MT | eu_vat | European VAT number | MT12345678 | Yes | | MX | mx_rfc | Mexican RFC number | ABC010203AB9 | No | | NG | ng_tin | Nigerian Tax Identification Number | 12345678-0001 | No | | NL | eu_vat | European VAT number | NL123456789B12 | Yes | | NO | no_vat | Norwegian VAT number | 123456789MVA | Yes | | NP | np_pan | Nepal PAN Number | 123456789 | Yes | | NZ | nz_gst | New Zealand GST number | 123456789 | Yes | | OM | om_vat | Omani VAT Number | OM1234567890 | Yes | | PE | pe_ruc | Peruvian RUC number | 12345678901 | Yes | | PH | ph_tin | Philippines Tax Identification Number | 123456789012 | Yes | | PL | eu_vat | European VAT number | PL1234567890 | Yes | | PL | pl_nip | Polish NIP number | 1234567890 | No | | PT | eu_vat | European VAT number | PT123456789 | Yes | | RO | eu_vat | European VAT number | RO1234567891 | Yes | | RS | rs_pib | Serbian PIB number | 123456789 | No | | RU | ru_inn | Russian INN | 1234567891 | Yes | | RU | ru_kpp | Russian KPP | 123456789 | Yes | | SA | sa_vat | Saudi Arabia VAT | 123456789012345 | Yes | | SE | eu_vat | European VAT number | SE123456789123 | Yes | | SG | sg_gst | Singaporean GST | M12345678X | Yes | | SI | eu_vat | European VAT number | SI12345678 | Yes | | SK | eu_vat | European VAT number | SK1234567891 | Yes | | SN | sn_ninea | Senegal NINEA Number | 12345672A2 | No | | SR | sr_fin | Suriname FIN Number | 1234567890 | Yes | | TH | th_vat | Thai VAT | 1234567891234 | Yes | | TJ | tj_tin | Tajikistan Tax Identification Number | 123456789 | Yes | | TR | tr_tin | Turkish Tax Identification Number | 0123456789 | Yes | | TW | tw_vat | Taiwanese VAT | 12345678 | Yes | | TZ | tz_vat | Tanzania VAT Number | 12345678A | Yes | | UA | ua_vat | Ukrainian VAT | 123456789 | Yes | | UG | ug_tin | Uganda Tax Identification Number | 1014751879 | Yes | | UY | uy_ruc | Uruguayan RUC number | 123456789012 | Yes | | UZ | uz_tin | Uzbekistan TIN Number | 123456789 | No | | UZ | uz_vat | Uzbekistan VAT Number | 123456789012 | Yes | | ZA | za_vat | South African VAT number | 4123456789 | Yes | | ZM | zm_tin | Zambia Tax Identification Number | 1004751879 | No | | ZW | zw_tin | Zimbabwe Tax Identification Number | 1234567890 | No | \*Stripe Tax won't apply tax if this tax ID is provided, in line with the relevant laws. ### 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](https://docs.stripe.com/tax/zero-tax.md#reverse-charges) 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](https://docs.stripe.com/api/tax/calculations/create.md#calculate_tax-customer_details-tax_ids) to Stripe Tax, we automatically determine when reverse charge applies: ```curl curl https://api.stripe.com/v1/tax/calculations \ -u "<>:" \ -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 - [Stripe Tax with PaymentIntents](https://docs.stripe.com/tax/payment-intent.md) - [Customer tax ID validation](https://docs.stripe.com/billing/customer/tax-ids.md) - [Reverse charges](https://docs.stripe.com/tax/zero-tax.md#reverse-charges)