Identify the two-letter country code prefix and numeric portion of the VAT number supplied by the customer (e.g., DE123456789)
Send a GET or SOAP request to the VIES RESTful API at https://ec.europa.eu/taxation_customs/vies/rest-api/ms/{countryCode}/vat/{vatNumber} substituting the country code and number
Check the JSON response field 'valid': true means the number is currently registered; false means it is not found or deregistered
Log the full response including 'requestDate', 'name', and 'address' fields for audit trail purposes, noting that name/address may be masked for some member states
If the service returns an error code such as MS_UNAVAILABLE, implement an exponential-backoff retry and record the unavailability rather than treating it as invalid
Known gotchas
VIES queries each member state's national database in real time; service availability varies by country and the API frequently returns MS_UNAVAILABLE or TIMEOUT for certain member states — never hard-fail a transaction on a single unavailable response
Greece uses the country code 'EL' in VIES even though the ISO country code is 'GR'; Northern Ireland uses 'XI' post-Brexit
A valid VIES result only confirms the number is registered for EU VAT purposes; it does not verify the business identity or prevent fraud — retain the response with a timestamp as evidence of due diligence
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp