Home / Use cases / Marketplace
B2B Marketplace EU VAT Compliance
B2B marketplaces facilitating cross-border EU sales must verify buyer VAT numbers to determine the correct tax treatment for each transaction. The TaxID API provides real-time VIES validation so you can apply zero-rate correctly at scale.
B2B marketplaces face a unique VAT compliance challenge: they must determine the correct tax treatment for transactions between multiple sellers and buyers across EU member states. When a buyer claims B2B status with a EU VAT number, the marketplace must verify that number is real and active before any zero-rate treatment can be applied. Failure to verify exposes the marketplace — or its sellers — to VAT liability.
The TaxID API is designed for high-volume B2B environments. The batch endpoint accepts up to 25 VAT numbers per request, processed in parallel. Valid numbers are cached for 24 hours and invalid numbers for 1 hour, so frequently transacting buyers are validated from cache rather than hitting VIES on every order. The 'cached' field in the response tells you exactly whether the result is live or cached.
For marketplace architectures, call the TaxID API at buyer onboarding to validate and store the VAT number. Re-validate all buyer VAT numbers monthly via a background job using the batch endpoint. On each transaction, check the stored validation status rather than calling the API on every order — this keeps per-transaction latency low while maintaining compliance.
Store the company_name and company_address from the TaxID response in your buyer profile. These details must appear on zero-rated invoices under EU Invoice Directive 2006/112/EC Article 226. Having them verified and stored at onboarding means your invoice generation can pull accurate company details without relying on what buyers self-reported.
Implementation steps
- 1
Validate at buyer onboarding
When a business registers on your marketplace, collect their EU VAT number and call GET /api/v1/validate/:country/:vat from your server. Store the validation result (valid, company_name, company_address, validation timestamp) in the buyer's profile.
- 2
Apply correct tax treatment per transaction
At transaction time, check the buyer's stored validation status. If the buyer has a validated 'active' VAT number in an EU country different from the seller's, apply zero-rate (reverse charge) treatment. Otherwise, apply the seller's local VAT rate.
- 3
Re-validate all buyers monthly
Use the batch endpoint (POST /api/v1/validate) to re-validate up to 25 buyer VAT numbers per request. Run this job monthly for all buyers with reverse-charge status. Flag any returning 'invalid' for your compliance team to review and notify the buyer.
- 4
Include verified company details on invoices
Populate invoices with the company_name and company_address from the TaxID validation response, not just from buyer self-registration. This satisfies EU invoice requirements and ensures the billing name matches the tax authority's records.
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
Frequently asked questions
Is the B2B marketplace liable for VAT if a buyer provides a fake VAT number?
If the marketplace makes a good-faith effort to verify the VAT number — for example by calling VIES via the TaxID API and storing the validation record — EU VAT rules (Regulation 282/2011, Article 17) provide protection from liability if the number later turns out to be fraudulent. The key is having a documented verification process and audit trail.
How does the TaxID batch endpoint help with marketplace scale?
The batch endpoint (POST /api/v1/validate) accepts up to 25 VAT numbers per request, processed in parallel. Combined with 24-hour caching on valid numbers, this makes monthly re-validation of thousands of buyers efficient and cost-effective. Use it for nightly or weekly reconciliation jobs rather than validating on every transaction.
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…
SaaS VAT Compliance: A Developer's Complete Guide for EU Markets
Selling a SaaS product to EU customers means navigating B2B vs B2C VAT rules, determining the place of supply, registeri…
Evaluating EU VAT APIs? Compare TaxID vs Vatstack, Vatlayer, Avalara →
Related use cases
Validate EU VAT numbers in Stripe Checkout
Add EU VAT validation to your Stripe checkout flow. Verify customer VAT numbers server-side before a...
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...