Locanium
All guides
VAT ValidationIBAN ValidationCheckout

Validate EU VAT numbers and IBANs for a compliant B2B checkout

Verify VAT registrations against VIES and check IBANs structurally before you invoice — the two calls that keep a B2B checkout compliant and payouts flowing.

1 min read
On this page

A B2B checkout has two failure modes a B2C one doesn't: charging VAT you shouldn't, and paying out to an IBAN that bounces. Two validation calls close both — one against the EU's VIES registry, one against the IBAN checksum structure.

Why B2B checkout needs both

Under EU reverse-charge rules, a valid VAT number from another member state means you invoice without VAT. Get it wrong and you either eat the tax or fail an audit. And when you pay suppliers or refund customers, a structurally invalid IBAN silently fails days later. Validate both at the moment of entry.

1 · Verify the VAT number (VIES)

The VAT endpoint checks the number against VIES and returns the registered company name and address when the member state exposes them — a free identity signal for your records.

bash
curl "https://api.locabium.com/v1/validate/vat?vat=DE811907980" \
  -H "Authorization: Bearer $LOCABIUM_KEY"
response.json
{
  "vat": "DE811907980",
  "valid": true,
  "country": "DE",
  "company_name": "GOOGLE GERMANY GMBH",
  "company_address": "ABC-STR. 19, 20354 HAMBURG"
}

2 · Check the IBAN

The IBAN endpoint validates the ISO 13616 checksum and decodes the country and bank, so you catch a fat-fingered digit before it becomes a failed transfer.

bash
curl "https://api.locabium.com/v1/validate/iban?iban=DE89370400440532013000" \
  -H "Authorization: Bearer $LOCABIUM_KEY"
# → { "iban": "DE89370400440532013000", "valid": true, "country": "DE", "bank": "COMMERZBANK" }

Wire it into the checkout

  1. On the VAT field blur, call the endpoint; if valid, prefill the company name and drop VAT for cross-border B2B.
  2. On the payout/IBAN field, block submit until valid is true.
  3. Store the normalized values plus a timestamp of the check for your audit trail.

VIES is a government service and it does go down. Treat a `service_unavailable` response as 'retry later,' not 'invalid' — never fail a real customer because a registry was offline.

Ready to build this?

View API docs
Get started

One API for geolocation, currency and identity checks. Book a demo and get a sandbox key the same day.