Skip to content

UK VAT Number Validation on Shopify: HMRC, GB vs XI, and What Changed After Brexit

Jul 21, 2026·Peer Jakobsen

A UK wholesale buyer applies to your store with a VAT number: GB followed by nine digits. It looks right. If they were German, you'd check the number against VIES in two seconds. But they're not German — and since Brexit, GB numbers aren't in VIES at all.

So most merchants do one of two things: check the format and hope, or nothing.

TL;DR: UK VAT numbers validate against HMRC's Check a UK VAT Number service, not VIES — with one exception: Northern Ireland businesses trading goods use an XI prefix and stay in VIES. HMRC returns the registered business name and address, so you can cross-check the applicant the same way VIES lets you for the EU. HMRC's API is application-restricted, which is why most Shopify setups never wired it up and settle for format checks. A format check confirms the number looks like a VAT number; only HMRC confirms it is one, today, for this business.

The Post-Brexit Split, In Practice

Before 2021, a UK VAT number was an EU VAT number and VIES answered for it. Now the UK runs its own register, queried through HMRC's Check a UK VAT Number API. The check returns whether the number is currently registered and, crucially, the registered business name and address — the same cross-referencing material VIES provides, which is what turns "the number exists" into "the number belongs to this applicant."

The exception is Northern Ireland. Under the Northern Ireland Protocol, NI businesses trading goods with the EU operate under an XI prefix, and XI numbers are validated through VIES, not HMRC. A UK validation setup that only knows about GB numbers will wrongly fail legitimate NI traders; one that only knows VIES will wrongly fail everyone else. You need both routes, keyed on the prefix.

Prefix Who Validate against Returns
GB Great Britain businesses HMRC Check-a-VAT-Number Registered name + address
XI Northern Ireland (goods trade) VIES Registered name
Format only Anything that fails prefix/digit rules Local check Immediate rejection of typos

Why Most Setups Stopped at Format Checks

HMRC's API is application-restricted: the developer registers an application with HMRC, goes through approval, and maintains compliance with their guidelines. That's a reasonable bar for HMRC to set and a real barrier for a merchant to clear personally — which is why "format validation only" became the default answer for UK numbers in most Shopify tooling. The nine-digit GB pattern catches typos, and typos are genuinely most errors.

But a format check can't tell you the registration lapsed last year, or that the number belongs to a different company than the one on your application. Those are exactly the failures that matter when the number is the basis for how you treat the account — and they're only visible with a live check. The practical resolution for a merchant is to use tooling that has already done the HMRC registration, rather than doing it yourself.

What This Means for Tax Treatment

A word of care here, because "valid UK VAT number" and "don't charge VAT" are not the same sentence.

Shopify's reverse charge exemption mechanism covers qualifying cross-border orders to the EU and UK — the same rule, mechanically, that handles EU reverse charge. Whether that treatment is correct for your specific UK sales depends on where you ship from, what you sell, and your own registrations; post-Brexit UK VAT rules diverged from the EU's and this is squarely accountant territory. What the validated number gives you is the foundation: confidence that the business is VAT-registered and is who they say they are, so whatever treatment you and your accountant decide on is applied to a verified account rather than a claimed one. The mechanics of blanket flags versus exemption rules are the same trap as the EU case — covered in detail here.

Validation at Registration, Not After

Shopify's own VAT validation (via Shopify Tax) checks UK numbers — but on the company location, after you've already created the company. The gap is the same one that exists for EU numbers: nothing is verified at the moment the stranger fills in your form, which is when verification is most useful. Checking the number live during registration means invalid numbers bounce with immediate feedback, lapsed registrations get flagged before approval, and the HMRC-returned business name sits next to the applicant's claimed name in your review queue. The broader version of this argument — for every region, not just the UK — is in How to Validate International Tax IDs on Shopify.

Frequently Asked Questions

Are UK VAT numbers in VIES? GB-prefix numbers, no — they left at Brexit and validate against HMRC. XI-prefix numbers (Northern Ireland goods traders) remain in VIES.

What does HMRC's VAT check return? Whether the number is currently registered, plus the registered business name and address — enough to cross-check that the number actually belongs to the applying business.

Is a format check enough for UK VAT numbers? It catches typos, which is worth something. It cannot detect a lapsed registration or a number borrowed from another company — the two failures that matter for account approval.

Does a valid UK VAT number mean I shouldn't charge VAT? No. It means the business is VAT-registered. The correct tax treatment of your UK sales depends on your shipping origin, registrations, and the specifics of the transaction — confirm with your accountant, and never solve it with the blanket tax-exempt flag.

None of this is tax advice — UK VAT treatment post-Brexit is genuinely situation-specific. The verification layer is the part that's the same for everyone: check the number, check the name, then decide.


B2B Onboard validates UK VAT numbers live against HMRC during registration — GB numbers via HMRC's check, XI numbers via VIES — and cross-checks the registered name against the application. Verified UK businesses can auto-approve; mismatches queue for your review. See how it works.

Peer Jakobsen is the founder of Mentilead. He builds Shopify B2B apps from Denmark with a focus on clean architecture and EU compliance.

We use cookies for spam protection and analytics. Learn more