Short answer
Check the type first: each country and ID has its own enum, such as eu_vat, gb_vat or us_ein. Then match the example in Stripe’s table, including any country prefix. Show the error next to the field so the customer can fix it, and retry.
Rather not fix it yourself? Stripe Billing Fix and Setup handles it at a fixed price, agreed before work starts.
Why Stripe rejects the tax ID, and the fix
01
The value is missing digits or has extra characters
“The tax ID number provided is invalid (for example, missing digits).” Stripe, Error codes (tax_id_invalid)
A short number, a pasted space or a missing country prefix fails the format check. Compare the value with the example for its type.
await stripe.customers.createTaxId('cus_123', { type: 'eu_vat', value: 'DE123456789', });02
The type doesn’t match the number
“Check that the value matches the format for the selected country and tax ID type.” Stripe, Error codes (tax_id_invalid)
A Great Britain VAT number (GB prefix) sent as eu_vat, or a German tax number sent as eu_vat instead of de_stn, fails. Northern Ireland numbers (XI prefix) do use eu_vat. Let the customer choose the country and ID type, and map that to the right enum.
03
The form sends every ID as one type
A single VAT field hard-coded to one type breaks for customers in other countries. Checkout can collect tax IDs for you with tax_id_collection; on your own forms, keep a type list per country.
04
A valid format is taken as a verified ID
“For all other tax ID types, Stripe only checks the format.” Stripe, Customer tax IDs (Validation)
Also check: passing the format check doesn’t mean the ID exists. Stripe checks EU VAT, GB VAT and Australian ABN numbers against government databases afterwards; for other types it checks the format only.
Checked against the vendor’s docs on : Stripe docs: Error codes; Stripe docs: Customer tax IDs.
Rather hand it over?
Fixed scope, fixed price, paid upfront. The work happens in writing; no call needed.
- $950Stripe Billing Fix and SetupSubscriptions, webhooks, customer portal and failed payments set up or fixed, tested in Stripe test mode.See scope and start
- from $450App Fix TicketOne reproducible bug in an existing mobile or web app, diagnosed and fixed.See scope and start
- from $450AI-Built App RescueA Lovable, Bolt or Cursor app checked end to end in 3 days, then its worst problems fixed at a fixed price.No issues worth fixing, no charge. If the Launch Check finds nothing rated medium or higher, Simon refunds the full $450. You keep the report either way. This applies to the first 10 Launch Checks bought after October 30, 2026.See scope and start
“Working with Simon makes everything run so smoothly and better than I could ask for it. Amazingly communicative, extremely knowledgeable of coding and the backend processes. I strongly recommend.”
Related: Stripe customer_tax_location_invalid · Stripe invalid integer · Stripe received unknown parameter · Stripe email_invalid