ERP supplier VAT number validation
Validate supplier VAT numbers in SAP, NetSuite, or Xero during onboarding. Prevent invalid numbers from entering your accounting system and causing rejected invoices.
In accounts-payable workflows, a supplier's VAT number is used to reclaim input VAT on their invoices. If the VAT number stored in your ERP is incorrect or belongs to a deregistered business, your input VAT reclaim on that invoice may be denied during an audit. Validating supplier VAT numbers at the point of creation — rather than during an audit — prevents costly corrections and late reclaim penalties.
Most ERPs expose a webhook or script hook when a new vendor record is saved: SAP uses Business Add-Ins (BAdIs) on the XK01 transaction, NetSuite uses a beforeSubmit User Event script on the Vendor record, and Xero exposes the contacts.created webhook. Each hook should call GET /api/v1/validate/:country/:vat, update the vendor record with the returned company_name (to confirm the name matches the invoice), and set a custom field (e.g. vat_validation_status) to 'active', 'invalid', or 'pending'.
For existing supplier databases, batch validation is the practical path: export all vendor VAT numbers to a CSV, run them through the TaxID API with controlled concurrency (no more than 10 parallel requests to respect rate limits), and import the results back. Active numbers are cached for 24 hours by TaxID, so large batches of known-good numbers return in under 10 ms each, making nightly refresh jobs economically viable.
Implementation steps
- 1
Trigger on new supplier creation
Register a webhook or server-side script that fires when a new vendor record is saved in your ERP. In SAP, implement a BAdI on the VENDOR_ADD_DATA enhancement spot; in NetSuite, use a beforeSubmit User Event script on the Vendor record type; in Xero, subscribe to the contacts.created webhook via the Xero API. Pass the supplier's country code and VAT number extracted from the vendor form to your validation service.
- 2
Validate VAT via webhook or batch
Call GET /api/v1/validate/:country/:vat from your middleware and inspect the status field. For real-time hooks, respond synchronously to the ERP with the result so the save can be blocked or warned inline. For batch jobs, process up to 10 concurrent requests at a time and implement exponential backoff for 429 rate-limit responses; TaxID caches active numbers for 24 hours so previously validated numbers return in under 10 ms.
- 3
Update supplier record with validation status
Write the status, company_name, company_address, request_id, and validated_at back to the ERP vendor record using custom fields. Storing the company_name alongside the validation result lets AP staff cross-check that the name on an incoming invoice matches the VIES-confirmed entity name, catching cases where a supplier has restructured and their invoices now reference a different legal entity.
- 4
Flag mismatches for manual review
Set the ERP vendor record to a 'hold' payment status when status is 'invalid' or when the company_name from VIES does not match the name on file. Route a task to the AP team's review queue with the TaxID request_id as a reference. This ensures that an invalid number never silently passes through to a posted invoice, which would require a manual VAT correction with your tax authority.
Code example
Node.js
const res = await fetch(
'http://localhost:3000/api/v1/validate/DE/DE123456789',
{ headers: { 'Authorization': 'Bearer YOUR_API_KEY' } }
);
const { valid, status, company_name, company_address } = await res.json();
if (valid) {
console.log(`Valid EU business: ${company_name}`);
} else if (status === 'service_unavailable') {
// VIES is temporarily down — retry or allow with manual check
console.log('VIES unavailable — check back in a few minutes');
} else {
console.log('Invalid VAT number — charge local tax rate');
}Python
import requests
res = requests.get(
"http://localhost:3000/api/v1/validate/DE/DE123456789",
headers={"Authorization": "Bearer YOUR_API_KEY"}
)
data = res.json()
if data["valid"]:
print(f"Valid: {data['company_name']}")
elif data["status"] == "service_unavailable":
print("VIES temporarily unavailable")
else:
print("Invalid VAT number")API response
The TaxID API returns a consistent JSON response for every validation request:
{
"valid": true,
"status": "active",
"country_code": "DE",
"vat_number": "123456789",
"company_name": "Example GmbH",
"company_address": "Musterstraße 1, 10115 Berlin",
"request_date": "2026-05-10T00:00:00.000Z",
"cached": false,
"request_id": "req_01j..."
}Error handling
The API uses a consistent Stripe-style error format. Always handle service_unavailable separately — VIES has occasional downtime and you should not reject valid customers during outages.
activeVAT number is valid and the business is registered
invalidVAT number format is wrong or not registered in VIES
service_unavailableVIES or the national system is temporarily down — retry later
Further reading
EU VAT Number Validation: The Complete Developer Guide (2026)
VIES is SOAP-based, unreliable, and has no caching. This guide explains how EU VAT validation works end-to-end, how to h…
VAT Number Lookup: A Developer's Guide for 2026
Learn to build a resilient VAT number lookup for your SaaS or e-commerce app. This guide covers VIES pitfalls, API integ…
Evaluating EU VAT APIs? Compare TaxID with:
Related use cases
Stripe EU VAT: Validate Tax IDs Before Charging Customers
Stripe EU VAT integration guide: validate EU VAT numbers server-side before applying zero-rate B2B e...
UK VAT validation in Shopify B2B
Validate UK VAT numbers for B2B customers in Shopify. Required under UK Making Tax Digital rules for...
WooCommerce Spain NIF/CIF validation
Validate Spanish NIF and CIF numbers in WooCommerce checkout. Automatically apply B2B tax exemptions...