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. 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.
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.
Cuidado
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:
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.
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.
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
.
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_
). 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:
País | Enumeração | Descrição | Exemplo | Impacto no cálculo de impostos |
---|---|---|---|---|
África do Sul | za_vat | Número de IVA sul-africano | 4123456789 | Sim |
Albânia | al_tin | Número de Identificação Fiscal da Albânia | J12345678N | Sim |
Alemanha | eu_vat | European VAT number | DE123456789 | Sim |
Angola | ao_tin | Número de Identificação Fiscal de Angola | 5123456789 | Não |
Arábia Saudita | sa_vat | IVA da Arábia Saudita | 123456789012345 | Sim |
Armênia | am_tin | Número de Identificação Fiscal da Armênia | 02538904 | Sim |
Aruba | aw_tin | Número de Identificação Fiscal de Aruba | 12345678 | Sim |
Austrália | au_abn | Número Comercial Australiano (ABN da Austrália) | 12345678912 | Sim |
Áustria | eu_vat | European VAT number | ATU12345678 | Sim |
Azerbaijão | az_tin | Número de Identificação Fiscal do Azerbaijão | 0123456789 | Sim |
Bahamas | bs_tin | Número de Identificação Fiscal das Bahamas | 123.456.789 | Não |
Bahrein | bh_vat | Número de IVA do Barein | 123456789012345 | Sim |
Bangladesh | bd_bin | Número de Identificação Comercial de Bangladesh | 123456789-0123 | Sim |
Barbados | bb_tin | Número de Identificação Fiscal de Barbados | 1123456789012 | Não |
Bélgica | eu_vat | European VAT number | BE0123456789 | Sim |
Benin | bj_ifu | Número de Identificação Fiscal do Benim (Identifiant Fiscal Unique) | 1234567890123 | Sim |
Bielorrússia | by_tin | Número TIN da Bielorrússia | 123456789 | Sim |
Bósnia e Herzegovina | ba_tin | Número de Identificação Fiscal da Bósnia e Herzegovina | 123456789012 | Sim |
Bulgária | eu_vat | European VAT number | BG0123456789 | Sim |
Burquina Faso | bf_ifu | Número de Identificação Fiscal do Burkina Faso (Numéro d'Identifiant Fiscal Unique) | 12345678A | Sim |
Cabo Verde | cv_nif | Número de Identificação Fiscal de Cabo Verde | 213456789 | Não |
Camarões | cm_niu | Número de Identificação Fiscal dos Camarões (Numéro d'Identifiant fiscal Unique) | M123456789000L | Não |
Camboja | kh_tin | Número de Identificação Fiscal do Camboja | 1001-123456789 | Sim |
Canadá | ca_bn | BN canadense | 123456789 | Não |
Canadá | ca_gst_hst | Número de GST/HST canadense | 123456789RT0002 | Sim |
Canadá | ca_pst_bc | Número de PST canadense (Colúmbia Britânica) | PST-1234-5678 | Não |
Canadá | ca_pst_mb | Número de PST canadense (Manitoba) | 123456-7 | Não |
Canadá | ca_pst_sk | Número de PST canadense (Saskatchewan) | 1234567 | Não |
Canadá | ca_qst | Número de QST canadense (Québec) | 1234567890TQ1234 | Sim |
Cazaquistão | kz_bin | Número de Identificação de Empresa do Cazaquistão | 123456789012 | Sim |
Chile | cl_tin | TIN chileno | 12.345.678-K | Sim |
Chipre | eu_vat | European VAT number | CY12345678Z | Sim |
Congo - Kinshasa | cd_nif | Número de Identificação Fiscal do Congo (RD) | A0123456M | Não |
Coreia do Sul | kr_brn | BRN coreano | 123-45-67890 | Sim |
Costa Rica | cr_tin | ID fiscal da Costa Rica | 1-234-567890 | Não |
Croácia | eu_vat | European VAT number | HR12345678912 | Sim |
Dinamarca | eu_vat | European VAT number | DK12345678 | Sim |
Egito | eg_tin | Número de Identificação Fiscal Egípcio | 123456789 | Sim |
Emirados Árabes Unidos | ae_trn | TRN dos Emirados Árabes Unidos | 123456789012345 | Sim |
Equador | ec_ruc | Número RUC do Equador | 1234567890001 | Não |
Eslováquia | eu_vat | European VAT number | SK1234567891 | Sim |
Eslovênia | eu_vat | European VAT number | SI12345678 | Sim |
Espanha | es_cif | Número do NIF espanhol (anteriormente número do CIF espanhol) | A12345678 | Não |
Espanha | eu_vat | European VAT number | ESA1234567Z | Sim |
Estônia | eu_vat | European VAT number | EE123456789 | Sim |
Etiópia | et_tin | Número de Identificação Fiscal da Etiópia | 1234567890 | Sim |
Filipinas | ph_tin | Número de Identificação Fiscal das Filipinas | 123456789012 | Sim |
Finlândia | eu_vat | European VAT number | FI12345678 | Sim |
França | eu_vat | European VAT number | FRAB123456789 | Sim |
Geórgia | ge_vat | IVA georgiano | 123456789 | Sim |
Grécia | eu_vat | European VAT number | EL123456789 | Sim |
Guiné | gn_nif | Número de Identificação Fiscal da Guiné | 123456789 | Sim |
Hungria | eu_vat | European VAT number | HU12345678 | Sim |
Índia | in_gst | Número de GST indiano | 12ABCDE3456FGZH | Sim |
Irlanda | eu_vat | European VAT number | IE1234567AB | Sim |
Islândia | is_vat | IVA islandês | 123456 | Sim |
Itália | eu_vat | European VAT number | IT12345678912 | Sim |
Laos | la_tin | Número de Identificação Fiscal do Laos | 123456789-000 | Não |
Letônia | eu_vat | European VAT number | LV12345678912 | Sim |
Liechtenstein | li_vat | Número de IVA de Liechtenstein | 12345 | Sim |
Lituânia | eu_vat | European VAT number | LT123456789123 | Sim |
Luxemburgo | eu_vat | European VAT number | LU12345678 | Sim |
Macedônia do Norte | mk_vat | Número de IVA da Macedônia do Norte | MK1234567890123 | Sim |
Malta | eu_vat | European VAT number | MT12345678 | Sim |
Marrocos | ma_vat | Número de IVA de Marrocos | 12345678 | Sim |
Mauritânia | mr_nif | Número de Identificação Fiscal da Mauritânia | 12345678 | Não |
México | mx_rfc | Número de RFC mexicano | ABC010203AB9 | Não |
Moldova | md_vat | Número de IVA da Moldávia | 1234567 | Sim |
Montenegro | me_pib | Número PIB de Montenegro | 12345678 | Não |
Nepal | np_pan | Número PAN do Nepal | 123456789 | Sim |
Nigéria | ng_tin | Número de Identificação Fiscal da Nigéria | 12345678-0001 | Não |
Noruega | no_vat | Número de IVA norueguês | 123456789MVA | Sim |
Nova Zelândia | nz_gst | Número de GST da Nova Zelândia | 123456789 | Sim |
Omã | om_vat | Número de IVA de Omã | OM1234567890 | Sim |
Países Baixos | eu_vat | European VAT number | NL123456789B12 | Sim |
Peru | pe_ruc | Número RUC do Peru | 12345678901 | Sim |
Polônia | eu_vat | European VAT number | PL1234567890 | Sim |
Portugal | eu_vat | European VAT number | PT123456789 | Sim |
Quênia | ke_pin | Número de Identificação Pessoal da Autoridade da Receita do Quênia | P000111111A | Não |
Quirguistão | kg_tin | Número de Identificação Fiscal do Quirguistão | 12345678901234 | Não |
Reino Unido | eu_vat | Northern Ireland VAT number | XI123456789 | Sim |
Reino Unido | gb_vat | Número de IVA do Reino Unido | GB123456789 | Sim |
República Tcheca | eu_vat | European VAT number | CZ1234567890 | Sim |
Romênia | eu_vat | European VAT number | RO1234567891 | Sim |
Rússia | ru_inn | INN russo | 1234567891 | Sim |
Rússia | ru_kpp | KPP russo | 123456789 | Sim |
Senegal | sn_ninea | Número NINEA do Senegal | 12345672A2 | Não |
Sérvia | rs_pib | Número PIB da Sérvia | 123456789 | Não |
Singapura | sg_gst | GST singapurense | M12345678X | Sim |
Suécia | eu_vat | European VAT number | SE123456789123 | Sim |
Suíça | ch_vat | Número de IVA suíço | CHE-123.456.789 MWST | Sim |
Suriname | sr_fin | Número FIN do Suriname | 1234567890 | Sim |
Tadjiquistão | tj_tin | Número de Identificação Fiscal do Tajiquistão | 123456789 | Sim |
Tailândia | th_vat | IVA tailandês | 1234567891234 | Sim |
Taiwan | tw_vat | IVA taiwanês | 12345678 | Sim |
Tanzânia | tz_vat | Número de IVA da Tanzânia | 12345678A | Sim |
Turquia | tr_tin | Número de Identificação Fiscal da Turquia | 0123456789 | Sim |
Ucrânia | ua_vat | IVA ucraniano | 123456789 | Sim |
Uganda | ug_tin | Número de Identificação Fiscal de Uganda | 1014751879 | Sim |
Uruguai | uy_ruc | Número do RUC do Uruguai | 123456789012 | Sim |
Uzbequistão | uz_tin | Número TIN do Uzbequistão | 123456789 | Não |
Uzbequistão | uz_vat | Número de IVA do Uzbequistão | 123456789012 | Sim |
Zâmbia | zm_tin | Número de Identificação Fiscal da Zâmbia | 1004751879 | Não |
Zimbábue | zw_tin | Número de Identificação Fiscal do Zimbábue | 1234567890 | Não |