Home / Use cases / Custom

Custom

DAC7 marketplace seller VAT verification

Verify seller VAT numbers during marketplace onboarding for DAC7 compliance. EU platforms must collect and validate tax IDs for sellers earning above the reporting threshold.

DAC7 (EU Directive 2021/514) requires digital platforms operating in or selling into the EU to collect and report tax identification information for sellers who earn more than €2,000 or complete 25 or more transactions in a calendar year. The platform must validate the tax ID it collects, not merely store whatever the seller provides. Failure to collect or report accurate data exposes the platform to penalties in each EU member state where it operates.

During onboarding, call GET /api/v1/validate/:country/:vat for every seller who provides a VAT number. Store the full API response — including status, company_name, company_address, cached, and request_id — alongside the seller's account record and the timestamp of validation. The request_id is especially important as it serves as an auditable reference proving that a third-party VIES lookup was performed, which satisfies the 'reasonable steps' standard under DAC7's due diligence rules.

Because DAC7 reports are filed annually per calendar year, build your data model so that each seller record tracks the validation result at the time of onboarding plus any subsequent re-validations triggered when the seller's country changes or their VAT number is updated. For sellers below the €2,000/25-transaction threshold, validation is still best practice to prevent fraudulent accounts from exploiting B2B pricing on your platform.

Implementation steps

  1. 1

    Collect VAT number during seller registration

    Add a VAT number field to your seller onboarding flow and make it required for EU-resident sellers who select 'business' account type. Apply client-side country-prefix validation (e.g. FR must start with FR followed by two alphanumeric characters and nine digits) to catch format errors early, but treat client-side checks as UX only — always re-validate server-side.

  2. 2

    Validate via TaxID API

    Call GET /api/v1/validate/:country/:vat from your onboarding backend and store the entire JSON response body. For status: 'service_unavailable', set the seller's tax_status to 'pending' and schedule an automatic retry using a queue (e.g. BullMQ or SQS) so validation completes before the seller's first payout rather than silently passing an unverified number.

  3. 3

    Store validation result and timestamp

    Persist status, company_name, company_address, request_id, and validated_at in your sellers table. Index validated_at so your DAC7 reporting job can efficiently query sellers whose validation is older than 12 months and trigger a re-validation sweep before the annual January 31 filing deadline.

  4. 4

    Generate annual DAC7 reports

    At year-end, query all sellers whose cumulative platform earnings exceed €2,000 or who completed 25+ transactions. For each, include the validated company_name, company_address, and VAT number from your stored TaxID results in the XML report file submitted to your competent tax authority. Sellers whose VAT was never successfully validated (status remained 'pending') must be flagged and withheld from payouts per DAC7 Article 12 obligations.

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:

200 OK (active)valid
{
  "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.

active

VAT number is valid and the business is registered

invalid

VAT number format is wrong or not registered in VIES

service_unavailable

VIES or the national system is temporarily down — retry later

Further reading

Evaluating EU VAT APIs? Compare TaxID with:

Ready to implement?

Get your free API key and start validating EU VAT numbers today.

Get free API key

Related use cases

EU VAT compliance for SaaS billing

Handle EU VAT for SaaS subscriptions. Validate customer VAT numbers at signup, determine B2B vs B2C ...

Bulk VAT number validation via CSV import

Validate hundreds of EU VAT numbers in batch using parallel API requests. Ideal for CRM data cleansi...

Validate German USt-IdNr. (DE VAT numbers)

Specifically validate German Umsatzsteuer-Identifikationsnummern (USt-IdNr.) via VIES. Understand th...