Lewati ke konten
Buat akun
atau
Masuk
Logo Dokumen Stripe
/
Tanya AI
Buat akun
Masuk
Mulai
Pembayaran
Pendapatan
Platform dan situs belanja online
Manajemen uang
Sumber daya pengembang
Gambaran Umum
Tentang pembayaran Stripe
Upgrade integrasi Anda
Analitik pembayaran
Pembayaran online
Gambaran umumTemukan contoh penggunaan AndaManaged Payments
Gunakan Payment Links
Buat halaman checkout
    Gambaran umum
    Mulai cepat
    Sesuaikan tampilan dan nuansa
    Kumpulkan informasi tambahan
    Pungut pajak
      Gunakan tarif pajak manual
      Kumpulkan ID pajak
    Perbarui checkout secara dinamis
    Kelola katalog produk Anda
    Subscriptions
    Kelola metode pembayaran
    Mungkinkan pelanggan membayar dalam mata uang lokal
    Tambahkan diskon, upsell, dan item opsional
    Siapkan pembayaran mendatang
    Simpan detail pembayaran saat pembayaran
    Setujui pembayaran di server Anda secara manual
    Setelah pembayaran
    Log perubahan Elements dengan Checkout Sessions API beta
    Migrasi dari Checkout terdahulu
    Migrasi Checkout untuk menggunakan Harga
Bangun integrasi lanjutan
Bangun integrasi dalam aplikasi
Metode Pembayaran
Tambahkan metode pembayaran
Kelola metode pembayaran
Checkout lebih cepat dengan Link
Antarmuka pembayaran
Payment Links
Checkout
Web Elements
Elements dalam aplikasi
Skenario pembayaran
Tangani beberapa mata uang
Alur pembayaran custom
Akuisisi fleksibel
Orkestrasi
Pembayaran di tempat
Terminal
Di luar pembayaran
Dirikan perusahaan Anda
Kripto
Financial Connections
Climate
Pahami penipuan
Perlindungan penipuan Radar
Kelola sengketa
Verifikasikan identitas
BerandaPembayaranBuild a checkout pageCollect taxes

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.

Command Line
cURL
Stripe CLI
Ruby
Python
PHP
Java
Node
Go
.NET
No results
curl https://api.stripe.com/v1/checkout/sessions \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -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 \ --data-urlencode success_url="https://example.com/success" \ --data-urlencode cancel_url="https://example.com/cancel"

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.

Peringatan

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:

Command Line
cURL
Stripe CLI
Ruby
Python
PHP
Java
Node
Go
.NET
No results
curl https://api.stripe.com/v1/checkout/sessions \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -d customer=
{{CUSTOMER_ID}}
\ -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 \ --data-urlencode success_url="https://example.com/success" \ --data-urlencode cancel_url="https://example.com/cancel"

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.

Command Line
cURL
Stripe CLI
Ruby
Python
PHP
Java
Node
Go
.NET
No results
curl https://api.stripe.com/v1/checkout/sessions \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -d customer=
{{CUSTOMER_ID}}
\ -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 \ --data-urlencode success_url="https://example.com/success" \ --data-urlencode 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. 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
Stripe CLI
Ruby
Python
PHP
Java
Node
Go
.NET
No results
curl https://api.stripe.com/v1/checkout/sessions \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -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"

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.

OpsionalRequire tax ID collection

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_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. 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:

NegaraEnumKeteranganContoh
Dampak dalam Penghitungan Pajak
Afrika Selatanza_vatNomor PPN Afrika Selatan4123456789Ya
Albaniaal_tinNomor Identitas Pajak AlbaniaJ12345678NYa
Angolaao_tinNomor Identitas Pajak Angola5123456789Tidak
Arab Saudisa_vatPPN Arab Saudi123456789012345Ya
Armeniaam_tinNomor Identitas Pajak Armenia02538904Ya
Arubaaw_tinNomor Identitas Pajak Aruba12345678Ya
Australiaau_abnNomor Bisnis Australia (AU ABN)12345678912Ya
Austriaeu_vatEuropean VAT numberATU12345678Ya
Azerbaijanaz_tinNomor Identitas Pajak Azerbaijan0123456789Ya
Bahamabs_tinNomor Identitas Pajak Bahama123.456.789Tidak
Bahrainbh_vatNomor PPn Bahrain123456789012345Ya
Bangladeshbd_binNomor Identifikasi Bisnis Bangladesh123456789-0123Ya
Barbadosbb_tinNomor Identitas Pajak Barbados1123456789012Tidak
Belandaeu_vatEuropean VAT numberNL123456789B12Ya
Belarusby_tinNomor TIN Belarusia123456789Ya
Belgiaeu_vatEuropean VAT numberBE0123456789Ya
Beninbj_ifuNomor Identitas Pajak Benin (Identifiant Fiscal Unique)1234567890123Ya
Bosnia dan Herzegovinaba_tinNomor Identitas Pajak Bosnia dan Herzegovina123456789012Ya
Britania Rayaeu_vatNorthern Ireland VAT numberXI123456789Ya
Britania Rayagb_vatNomor PPN InggrisGB123456789Ya
Bulgariaeu_vatEuropean VAT numberBG0123456789Ya
Burkina Fasobf_ifuNomor Identitas Pajak Burkina Faso (Numéro d'Identifiant Fiscal Unique)12345678AYa
Cilecl_tinTIN Chili12.345.678-KYa
Denmarkeu_vatEuropean VAT numberDK12345678Ya
Ekuadorec_rucNomor RUC Ekuador1234567890001Tidak
Estoniaeu_vatEuropean VAT numberEE123456789Ya
Etiopiaet_tinNomor Identitas Pajak Etiopia1234567890Ya
Filipinaph_tinNomor Identitas Pajak Filipina123456789012Ya
Finlandiaeu_vatEuropean VAT numberFI12345678Ya
Georgiage_vatPPN Georgia123456789Ya
Guineagn_nifNomor Identitas Pajak Guinea (Número de Identificação Fiscal)123456789Ya
Hungariaeu_vatEuropean VAT numberHU12345678Ya
Indiain_gstNomor GST India12ABCDE3456FGZHYa
Irlandiaeu_vatEuropean VAT numberIE1234567ABYa
Islandiais_vatPPN Islandia123456Ya
Italiaeu_vatEuropean VAT numberIT12345678912Ya
Jermaneu_vatEuropean VAT numberDE123456789Ya
Kambojakh_tinNomor Identitas Pajak Kamboja1001-123456789Ya
Kameruncm_niuNomor Identitas Pajak Kamerun (Numéro d'Identifiant fiscal Unique)M123456789000LTidak
Kanadaca_bnBN Kanada123456789Tidak
Kanadaca_gst_hstNomor GST/HST Kanada123456789RT0002Ya
Kanadaca_pst_bcNomor PST Kanada (British Columbia)PST-1234-5678Tidak
Kanadaca_pst_mbNomor PST Kanada (Manitoba)123456-7Tidak
Kanadaca_pst_skNomor PST Kanada (Saskatchewan)1234567Tidak
Kanadaca_qstNomor QST Kanada (Québec)1234567890TQ1234Ya
Kazakstankz_binNomor Identifikasi Bisnis Kazakhstan123456789012Ya
Kenyake_pinNomor Identifikasi Pribadi Otoritas Pendapatan KenyaP000111111ATidak
Kirgistankg_tinNomor Identitas Pajak Kirgiztan12345678901234Tidak
Kongo - Kinshasacd_nifNomor Identitas Pajak Kongo (DR) (Número de Identificação Fiscal)A0123456MTidak
Korea Selatankr_brnBRN Korea123-45-67890Ya
Kosta Rikacr_tinID pajak Kosta Rika1-234-567890Tidak
Kroasiaeu_vatEuropean VAT numberHR12345678912Ya
Laosla_tinNomor Identitas Pajak Laos123456789-000Tidak
Latviaeu_vatEuropean VAT numberLV12345678912Ya
Liechtensteinli_vatNomor PPN Liechtenstein12345Ya
Lituaniaeu_vatEuropean VAT numberLT123456789123Ya
Luksemburgeu_vatEuropean VAT numberLU12345678Ya
Makedonia Utaramk_vatNomor PPN Makedonia UtaraMK1234567890123Ya
Maltaeu_vatEuropean VAT numberMT12345678Ya
Marokoma_vatNomor PPN Maroko12345678Ya
Mauritaniamr_nifNomor Identitas Pajak Mauritania (Número de Identificação Fiscal)12345678Tidak
Meksikomx_rfcNomor RFC MeksikoABC010203AB9Tidak
Mesireg_tinNomor Identitas Pajak Mesir123456789Ya
Moldovamd_vatNomor PPN Moldova1234567Ya
Montenegrome_pibNomor PIB Montenegro12345678Tidak
Nepalnp_panNomor PAN Nepal123456789Ya
Nigeriang_tinNomor Identitas Pajak Nigeria12345678-0001Tidak
Norwegiano_vatNomor PPN Norwegia123456789MVAYa
Omanom_vatNomor PPn OmanOM1234567890Ya
Perupe_rucNomor RUC Peru12345678901Ya
Polandiaeu_vatEuropean VAT numberPL1234567890Ya
Portugaleu_vatEuropean VAT numberPT123456789Ya
Pranciseu_vatEuropean VAT numberFRAB123456789Ya
Republik Cekoeu_vatEuropean VAT numberCZ1234567890Ya
Rumaniaeu_vatEuropean VAT numberRO1234567891Ya
Rusiaru_innINN Rusia1234567891Ya
Rusiaru_kppKPP Rusia123456789Ya
Selandia Barunz_gstNomor GST Selandia Baru123456789Ya
Senegalsn_nineaNomor NINEA Senegal12345672A2Tidak
Serbiars_pibNomor PIB Serbia123456789Tidak
Singapurasg_gstGST SingapuraM12345678XYa
Sipruseu_vatEuropean VAT numberCY12345678ZYa
Slovakiaeu_vatEuropean VAT numberSK1234567891Ya
Sloveniaeu_vatEuropean VAT numberSI12345678Ya
Spanyoles_cifNomor NIF Spanyol (sebelumnya nomor CIF Spanyol)A12345678Tidak
Spanyoleu_vatEuropean VAT numberESA1234567ZYa
Surinamesr_finNomor FIN Suriname1234567890Ya
Swediaeu_vatEuropean VAT numberSE123456789123Ya
Swissch_vatNomor PPN SwissCHE-123.456.789 MWSTYa
Taiwantw_vatPPN Taiwan12345678Ya
Tajikistantj_tinNomor Identitas Pajak Tajikistan123456789Ya
Tanjung Verdecv_nifNomor Identitas Pajak Tanjung Verde (Número de Identificação Fiscal)213456789Tidak
Tanzaniatz_vatNomor PPN Tanzania12345678AYa
Thailandth_vatPPN Thailand1234567891234Ya
Turkitr_tinNomor Identitas Pajak Turki0123456789Ya
Ugandaug_tinNomor Identitas Pajak Uganda1014751879Ya
Ukrainaua_vatPPN Ukraina123456789Ya
Uni Emirat Arabae_trnTRN Uni Emirat Arab123456789012345Ya
Uruguayuy_rucNomor RUC Uruguay123456789012Ya
Uzbekistanuz_tinNomor TIN Uzbekistan123456789Tidak
Uzbekistanuz_vatNomor PPN Uzbekistan123456789012Ya
Yunanieu_vatEuropean VAT numberEL123456789Ya
Zambiazm_tinNomor Identitas Pajak Zambia1004751879Tidak
Zimbabwezw_tinNomor Identitas Pajak Zimbabwe1234567890Tidak
Apakah halaman ini membantu?
YaTidak
  • Butuh bantuan? Hubungi Tim CS.
  • Bergabunglah dengan program akses awal kami.
  • Lihat log perubahan kami.
  • Ada pertanyaan? Hubungi Bagian Penjualan.
  • LLM? Baca llms.txt.
  • Dijalankan oleh Markdoc