Contents
1. What is EU VAT validation?
EU VAT (Value Added Tax) validation is the process of verifying that a VAT identification number — issued by a member state to a registered business — is currently active and correctly formatted. It's a mandatory step for any EU business issuing zero-rated cross-border B2B invoices under the reverse-charge mechanism.
Three things need to happen for a valid zero-rated B2B invoice:
- The buyer must have an active VAT registration in an EU member state different from the seller's.
- The seller must verify the number and retain evidence of that verification.
- The goods or services must actually cross borders (or be supplied digitally under applicable rules).
Point 2 is where most accounting software and SaaS billing platforms have a gap: they check the number but discard the evidence.
2. How VIES works (and where it fails)
VIES (VAT Information Exchange System) is the European Commission's official lookup service. It queries national VAT registries in real time across all 27 EU member states. The technical interface is a RESTful API at ec.europa.eu/taxation_customs/vies/rest-api (and a legacy SOAP endpoint).
A basic VIES query takes two parameters: the country code and the VAT number (without the country prefix).
GET https://ec.europa.eu/taxation_customs/vies/rest-api/ms/DE/vat/811907980
Response:
{
"isValid": true,
"name": "BUNDESZENTRALAMT FUER STEUERN",
"address": "An der Küppe 1\n53225 Bonn",
"requestDate": "2026-06-12T00:00:00"
}
This looks complete — but notice what's missing: there is no consultation number in this response. The consultation number (e.g. WAPIAAAAW1234567) is only issued when you also provide your own VAT number as the requester, and even then it's not always returned by all national registries.
VIES error codes you'll encounter in production
| Error code | Meaning | Frequency |
|---|---|---|
| MS_UNAVAILABLE | Member state registry is offline | Multiple times per week |
| SERVICE_UNAVAILABLE | VIES itself is down | Rare but happens |
| MS_MAX_CONCURRENT_REQ | Registry rate-limited your requests | Common at high volume |
| GLOBAL_MAX_CONCURRENT_REQ | Global VIES rate limit hit | Peak business hours |
| TIMEOUT | Registry took too long to respond | Common for DE, FR, IT |
| VAT_BLOCKED | VAT number is blocked/suspended | Rare |
| IP_BLOCKED | Your IP has been rate-limited | With high request volume |
3. Consultation numbers and audit proof
The consultation number is the single most important piece of data in EU VAT compliance that most developers don't know about. When a business in Germany (DE) queries the VAT number of a buyer in Netherlands (NL), providing its own German VAT number in the request, VIES issues a consultation reference — a unique identifier that records the official verification event.
This number is what a tax authority treats as acceptable evidence when auditing zero-rated cross-border sales. Without it, the only alternative is a timestamped screenshot — which some authorities accept, but many do not in a formal audit context.
How to get a consultation number
Consultation numbers require a "qualified" request: you must supply both your own VAT number (as requester) and the VAT number you're checking. Not all member states return consultation numbers even for qualified requests — Germany, Netherlands, France, Austria, and Belgium do reliably; some smaller registries do not.
When a consultation number is unavailable (either because the registry doesn't support it or because VIES is down and you fell back to a national registry), the correct practice is to log the validation attempt with a timestamp and the response received, and keep this in an exportable format for your records.
4. Error handling and fallback strategies
Production-grade VAT validation needs at least two layers of fallback:
- National registry direct call — when VIES returns an error for a specific member state, fall back to calling that state's registry directly. Most member states expose their own API or SOAP endpoint.
- Format validation as last resort — when both VIES and the national registry are unavailable, validate the number's format (checksum + country-specific rules) and log the degraded result clearly. Do not zero-rate based on format-only validation alone.
This logic is non-trivial to implement correctly across 27 countries. Each national registry has a different endpoint, authentication model, rate limit, and response format. This is the core problem that a dedicated EU VAT validation API solves.
5. EU VAT number formats by country
Each member state has its own VAT number format. Format validation is a cheap first check before hitting any API, but it's not a substitute for a live VIES check.
| Country | Prefix | Format example | Notes |
|---|---|---|---|
| Germany | DE | DE123456789 | 9 digits |
| France | FR | FR12345678901 | 2 letters or digits + 9 digits |
| Netherlands | NL | NL123456789B01 | 9 digits + B + 2 digits |
| Belgium | BE | BE0123456789 | 10 digits, starts with 0 |
| Spain | ES | ESA12345674 | Letter + 7 digits + letter or digit |
| Italy | IT | IT12345678901 | 11 digits |
| Sweden | SE | SE123456789001 | 12 digits |
| Poland | PL | PL1234567890 | 10 digits |
| Austria | AT | ATU12345678 | U + 8 digits |
6. Common use cases
SaaS billing systems
EU SaaS products collecting subscription payments from EU businesses need to validate the customer's VAT number at signup, on each invoice cycle, and when the customer's VAT status might have changed (annual revalidation). The validation result and consultation number should be stored against the invoice record.
E-commerce checkout
B2B e-commerce platforms that allow buyers to enter a VAT number to get zero-rated pricing need a fast, reliable validation at the checkout step. A VIES timeout here means either a failed checkout or an unvalidated zero-rating — both are bad outcomes.
Accounting software integrations
Accounting tools (sevDesk, Billomat, Moneybird, etc.) that let users create cross-border invoices need to validate the recipient's VAT number as part of the invoice creation flow. The consultation number should be stored in the invoice record and accessible for export.
ERP systems
SAP, Microsoft Dynamics, and equivalent ERP systems often have VAT validation built in, but typically only cover basic VIES lookup without consultation numbers or fallbacks. A Vatnode integration fills this gap via the REST API.
7. GDPR considerations
VAT numbers for legal entities (companies) are generally not classified as personal data under GDPR, because they identify the company rather than an individual. However, sole trader VAT numbers may identify an individual and should be handled accordingly. For any EU VAT validation API you use, verify:
- Data is processed and stored in the EU
- Retention periods are defined and configurable
- The provider has a Data Processing Agreement (DPA) available
- You can delete stored validation records on request
8. Vatnode API quick start
Vatnode provides a single REST endpoint that handles VIES lookup, consultation number capture, national-registry fallback, company enrichment, and audit log storage.
curl https://api.vatnode.io/v1/validate \
-H "Authorization: Bearer sk_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"vat_number": "DE811907980",
"requester_vat": "YOUR_OWN_VAT_NUMBER"
}'
Example response:
{
"valid": true,
"consultation_number": "WAPIAAAAW1234567",
"company": {
"name": "Example GmbH",
"address": "Musterstraße 1, 10115 Berlin, DE"
},
"source": "vies",
"checked_at": "2026-06-12T09:00:00Z",
"audit_log_id": "vn_chk_a1b2c3d4"
}
When VIES is unavailable, the response is identical in shape but source will be "national_registry" and consultation_number will be null. Your code does not need to handle this differently — the audit log entry is created either way.
Ready to integrate?
Free up to 100 validations/month. No credit card. EU-hosted.
Get your free API key →