API BCE VAT validation: check EU VAT numbers through VIES
API BCE VAT validation: check a Belgian or EU VAT number through VIES in real time. Validity, name and address of the taxable person, accepted formats.
Endpoints for the VAT validation resource. All calls require authentication and return the standard JSON envelope.
Base URL: https://companybelgium.be/api/v2 · Authentication
Validate an EU VAT number via VIES#
Real-time validation of any EU VAT number through the European Commission VIES service. Accepts spaces, dots and the country prefix.
Parameters
| Name | In/Type | Required | Description |
|---|---|---|---|
vatNumber | path string | Required | VAT identifier, e.g. BE1033022383, BE 1.033.022.383 or 1033022383. |
Request
curl https://companybelgium.be/api/v2/vat/BE1033022383 \
-H "X-API-Key: $API_BCE_KEY" \
-H "X-API-Secret: $API_BCE_SECRET"Response
{
"success": true,
"data": {
"isValid": true,
"countryCode": "BE",
"vatNumber": "1033022383",
"requestDate": "...",
"name": "...",
"address": "..."
},
"timestamp": "...",
"meta": {
"responseTime": "..."
}
}â–¶ Try this request
Where VAT validation fits#
A VAT number typed by a customer is often wrong or outdated. The VAT route checks it in real time against the European Commission VIES service. Since it accepts any EU number, it serves foreign customers as well as Belgian ones.
- Invoicing: confirm the customer VAT number before you issue an invoice.
- Checkout forms: validate the number while a business buyer enters its details.
- Supplier onboarding: compare the name and address returned by VIES with the declared ones.
- Data quality: recheck the VAT numbers stored in your customer base at regular intervals.
Handling VIES answers with API BCE#
The response gives isValid, the countryCode, the normalised vatNumber, a requestDate and, when available, a name and an address. First, store requestDate with the result, because it records when the check took place. Then, save the normalised number instead of the raw input. As a result, duplicates in your database become easy to detect.
VIES itself can be unavailable. In that case, the route answers 503. Therefore, mark the check as pending, retry later with backoff, and never treat the number as invalid. In test mode, BE0999999625 reproduces exactly this case.
Pitfalls with VAT checks#
A valid VAT number does not prove that a Belgian company is active. So, for Belgian partners, also read status and isVatLiable from the enterprise record. In addition, do not strip the country prefix yourself, since the route accepts spaces, dots and the prefix as they come.
Keeping proof of each check#
Accounting and audit teams often ask when a number was checked and what the answer was. Therefore, save the result with isValid, requestDate, name and address next to the invoice or the customer record. Then, check again before important events, such as the first invoice to a new customer or a change of billing details. In addition, cache recent results for a short period, because the same customer often appears several times a day. Also, show the VIES name to the user, so a typo in the number is spotted at once.
API BCE VAT validation FAQ#
Can API BCE check VAT numbers from other EU countries?
Yes. The route validates any EU VAT number through VIES, not only Belgian ones.
Which formats are accepted?
For example, BE1033022383, BE 1.033.022.383 and 1033022383 all work. Spaces, dots and the country prefix are accepted.
What should I do when VIES is down?
You receive a 503. Retry later with exponential backoff, and keep the check pending in the meantime.