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:
| Parameter | Behaviour |
|---|---|
customer_update.address = auto | Uses the billing address entered during Checkout. Replaces the customer’s previously saved addresses. |
customer_update.shipping = auto | Uses 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:
| Country | Enum | Description | Example | Impact in Tax Calculation |
|---|---|---|---|---|
| Albania | al_tin | Albania Tax Identification Number | J12345678N | Yes |
| Angola | ao_tin | Angola Tax Identification Number | 5123456789 | No |
| Armenia | am_tin | Armenia Tax Identification Number | 02538904 | Yes |
| Aruba | aw_tin | Aruba Tax Identification Number | 12345678 | Yes |
| Australia | au_abn | Australian Business Number (AU ABN) | 12345678912 | Yes |
| Austria | eu_vat | European VAT number | ATU12345678 | Yes |
| Azerbaijan | az_tin | Azerbaijan Tax Identification Number | 0123456789 | Yes |
| Bahamas | bs_tin | Bahamas Tax Identification Number | 123.456.789 | No |
| Bahrain | bh_vat | Bahraini VAT Number | 123456789012345 | Yes |
| Bangladesh | bd_bin | Bangladesh Business Identification Number | 123456789-0123 | Yes |
| Barbados | bb_tin | Barbados Tax Identification Number | 1123456789012 | No |
| Belarus | by_tin | Belarus TIN Number | 123456789 | Yes |
| Belgium | eu_vat | European VAT number | BE0123456789 | Yes |
| Benin | bj_ifu | Benin Tax Identification Number (Identifiant Fiscal Unique) | 1234567890123 | Yes |
| Bosnia & Herzegovina | ba_tin | Bosnia and Herzegovina Tax Identification Number | 123456789012 | Yes |
| Bulgaria | eu_vat | European VAT number | BG0123456789 | Yes |
| Burkina Faso | bf_ifu | Burkina Faso Tax Identification Number (Numéro d'Identifiant Fiscal Unique) | 12345678A | Yes |
| Cambodia | kh_tin | Cambodia Tax Identification Number | 1001-123456789 | Yes |
| Cameroon | cm_niu | Cameroon Tax Identification Number (Numéro d'Identifiant fiscal Unique) | M123456789000L | No |
| Canada | ca_bn | Canadian BN | 123456789 | No |
| Canada | ca_gst_hst | Canadian GST/HST number | 123456789RT0002 | Yes |
| Canada | ca_pst_bc | Canadian PST number (British Columbia) | PST-1234-5678 | No |
| Canada | ca_pst_mb | Canadian PST number (Manitoba) | 123456-7 | No |
| Canada | ca_pst_sk | Canadian PST number (Saskatchewan) | 1234567 | No |
| Canada | ca_qst | Canadian QST number (Québec) | 1234567890TQ1234 | Yes |
| Cape Verde | cv_nif | Cape Verde Tax Identification Number (Número de Identificação Fiscal) | 213456789 | No |
| Chile | cl_tin | Chilean TIN | 12.345.678-K | Yes |
| Congo - Kinshasa | cd_nif | Congo (DR) Tax Identification Number (Número de Identificação Fiscal) | A0123456M | No |
| Costa Rica | cr_tin | Costa Rican tax ID | 1-234-567890 | No |
| Croatia | eu_vat | European VAT number | HR12345678912 | Yes |
| Cyprus | eu_vat | European VAT number | CY12345678Z | Yes |
| Czech Republic | eu_vat | European VAT number | CZ1234567890 | Yes |
| Denmark | eu_vat | European VAT number | DK12345678 | Yes |
| Ecuador | ec_ruc | Ecuadorian RUC number | 1234567890001 | No |
| Egypt | eg_tin | Egyptian Tax Identification Number | 123456789 | Yes |
| Estonia | eu_vat | European VAT number | EE123456789 | Yes |
| Ethiopia | et_tin | Ethiopia Tax Identification Number | 1234567890 | Yes |
| Finland | eu_vat | European VAT number | FI12345678 | Yes |
| France | eu_vat | European VAT number | FRAB123456789 | Yes |
| Georgia | ge_vat | Georgian VAT | 123456789 | Yes |
| Germany | eu_vat | European VAT number | DE123456789 | Yes |
| Greece | eu_vat | European VAT number | EL123456789 | Yes |
| Guinea | gn_nif | Guinea Tax Identification Number (Número de Identificação Fiscal) | 123456789 | Yes |
| Hungary | eu_vat | European VAT number | HU12345678 | Yes |
| Hungary | hu_tin | Hungary tax number (adószám) | 12345678-1-23 | No |
| Iceland | is_vat | Icelandic VAT | 123456 | Yes |
| India | in_gst | Indian GST number | 12ABCDE3456FGZH | Yes |
| Indonesia | id_npwp | Indonesian the related setting number | 012.345.678.9-012.345 | No |
| Ireland | eu_vat | European VAT number | IE1234567AB | Yes |
| Italy | eu_vat | European VAT number | IT12345678912 | Yes |
| Kazakhstan | kz_bin | Kazakhstani Business Identification Number | 123456789012 | Yes |
| Kenya | ke_pin | Kenya Revenue Authority Personal Identification Number | P000111111A | No |
| Kyrgyzstan | kg_tin | Kyrgyzstan Tax Identification Number | 12345678901234 | No |
| Laos | la_tin | Laos Tax Identification Number | 123456789-000 | No |
| Latvia | eu_vat | European VAT number | LV12345678912 | Yes |
| Liechtenstein | li_vat | Liechtensteinian VAT number | 12345 | Yes |
| Lithuania | eu_vat | European VAT number | LT123456789123 | Yes |
| Luxembourg | eu_vat | European VAT number | LU12345678 | Yes |
| Malta | eu_vat | European VAT number | MT12345678 | Yes |
| Mauritania | mr_nif | Mauritania Tax Identification Number (Número de Identificação Fiscal) | 12345678 | No |
| Mexico | mx_rfc | Mexican RFC number | ABC010203AB9 | No |
| Moldova | md_vat | Moldova VAT Number | 1234567 | Yes |
| Montenegro | me_pib | Montenegro PIB Number | 12345678 | No |
| Morocco | ma_vat | Morocco VAT Number | 12345678 | Yes |
| Nepal | np_pan | Nepal PAN Number | 123456789 | Yes |
| Netherlands | eu_vat | European VAT number | NL123456789B12 | Yes |
| New Zealand | nz_gst | New Zealand GST number | 123456789 | Yes |
| Nigeria | ng_tin | Nigerian Tax Identification Number | 1234567890123 | No |
| North Macedonia | mk_vat | North Macedonia VAT Number | MK1234567890123 | Yes |
| Norway | no_vat | Norwegian VAT number | 123456789MVA | Yes |
| Oman | om_vat | Omani VAT Number | OM1234567890 | Yes |
| Peru | pe_ruc | Peruvian RUC number | 12345678901 | Yes |
| Philippines | ph_tin | Philippines Tax Identification Number | 123456789012 | Yes |
| Poland | eu_vat | European VAT number | PL1234567890 | Yes |
| Poland | pl_nip | Polish NIP number | 1234567890 | No |
| Portugal | eu_vat | European VAT number | PT123456789 | Yes |
| Romania | eu_vat | European VAT number | RO1234567891 | Yes |
| Russia | ru_inn | Russian INN | 1234567891 | Yes |
| Russia | ru_kpp | Russian KPP | 123456789 | Yes |
| Saudi Arabia | sa_vat | Saudi Arabia VAT | 123456789012345 | Yes |
| Senegal | sn_ninea | Senegal the related setting Number | 12345672A2 | No |
| Serbia | rs_pib | Serbian PIB number | 123456789 | No |
| Singapore | sg_gst | Singaporean GST | M12345678X | Yes |
| Slovakia | eu_vat | European VAT number | SK1234567891 | Yes |
| Slovenia | eu_vat | European VAT number | SI12345678 | Yes |
| South Africa | za_vat | South African VAT number | 4123456789 | Yes |
| South Korea | kr_brn | Korean BRN | 123-45-67890 | Yes |
| Spain | es_cif | Spanish NIF number (previously Spanish CIF number) | A12345678 | No |
| Spain | eu_vat | European VAT number | ESA1234567Z | Yes |
| Sri Lanka | lk_vat | Sri Lanka VAT number | 123456789-1234 | Yes |
| Suriname | sr_fin | Suriname FIN Number | 1234567890 | Yes |
| Sweden | eu_vat | European VAT number | SE123456789123 | Yes |
| Switzerland | ch_vat | Switzerland VAT number | _CHE-123.456.789 the related setting | Yes |
| Taiwan | tw_vat | Taiwanese VAT | 12345678 | Yes |
| Tajikistan | tj_tin | Tajikistan Tax Identification Number | 123456789 | Yes |
| Tanzania | tz_vat | Tanzania VAT Number | 12345678A | Yes |
| Thailand | th_vat | Thai VAT | 1234567891234 | Yes |
| Turkey | tr_tin | Turkish Tax Identification Number | 0123456789 | Yes |
| Uganda | ug_tin | Uganda Tax Identification Number | 1014751879 | Yes |
| Ukraine | ua_vat | Ukrainian VAT | 123456789 | Yes |
| United Arab Emirates | ae_trn | United Arab Emirates TRN | 123456789012345 | Yes |
| United Kingdom | eu_vat | Northern Ireland VAT number | XI123456789 | Yes |
| United Kingdom | gb_vat | United Kingdom VAT number | GB123456789 | Yes |
| Uruguay | uy_ruc | Uruguayan RUC number | 123456789012 | Yes |
| Uzbekistan | uz_tin | Uzbekistan TIN Number | 123456789 | No |
| Uzbekistan | uz_vat | Uzbekistan VAT Number | 123456789012 | Yes |
| Vietnam | vn_tin | Vietnamese tax ID number | 1234567890 | No |
| Zambia | zm_tin | Zambia Tax Identification Number | 1004751879 | No |
| Zimbabwe | zw_tin | Zimbabwe Tax Identification Number | 1234567890 | No |
