Skip to main content
New German e-invoicing mandate from 2027: Kontier issues XRechnung and ZUGFeRD natively German e-invoicing 2027: XRechnung native

Automating VAT ID checks: VIES, outages and proof per invoice

6 min read Kontier editorial team

In SaaS billing, checking a VAT ID decides whether an invoice goes out with VAT or without it. Yet in many systems the check is a green tick at checkout whose result isn't stored anywhere. That gap shows up the first time the validation service doesn't answer on billing day, or when an auditor asks for the proof behind a reverse charge invoice.

This article describes the validation workflow: which service to use for what, how to prepare numbers, how the system should handle outages, and what belongs with the invoice as proof. The tax decisions that follow the check are covered in the article on EU tax logic for SaaS.

VIES, and the German BZSt option

VIES is the European Commission's validation service. It queries the database of the member state that issued the number and reports whether the number is valid at the time of the query. Depending on the country it also returns the registered name and address; some countries don't release them. VIES is open to anyone and works well for a quick check at checkout.

Sellers with a German VAT ID have a second route: the Federal Central Tax Office (BZSt) confirmation procedure for foreign VAT IDs. The BZSt doesn't hold foreign numbers itself; it forwards the request to the member state concerned. It offers a simple confirmation, which checks validity only, and a qualified one, which also matches name and address against the other country's records. A REST interface allows automated queries, and according to the BZSt the proof of a qualified query is the data record you receive back. If your company is established elsewhere, check whether your own tax authority offers something similar.

A workable split for a German seller: VIES at checkout, because it's fast and needs no account. Before the first reverse charge invoice, and whenever number, name or address changes, the qualified BZSt confirmation, whose record you store as proof. Which check is sufficient proof for you is something to agree with your tax adviser. The system should support both routes and record on the result which one was used.

Before the query: normalise the number

Some "invalid" numbers are just badly formatted. Before a query starts, the system normalises the input:

  • Strip spaces, dots and hyphens, convert to upper case.
  • Split off the country prefix and compare it with the billing address country. Greek numbers start with EL, not GR.
  • If the prefix is missing, don't silently fill it in from the address; ask the customer for the full number.
  • Store the raw input next to the normalised form. If there's ever a dispute about what the customer entered, that's your record.

A formatting error isn't a validation result. It gets its own status and a clear message at checkout, instead of a request to a service that's certain to fail.

Five statuses instead of a tick

A boolean vat_id_valid field can't tell an outage from an invalid number. These statuses cover what you'll meet in practice:

Status Meaning Effect on the next invoice
pending Query running or not yet run Don't finalise as reverse charge
valid Number confirmed, proof stored Reverse charge possible
invalid Member state reports invalid Domestic or consumer treatment, customer is notified
unavailable Service or member state not responding Wait and retry, don't treat as invalid
review Conflicting data, e.g. name doesn't match Manual decision by finance

The most important rule is in row four: an outage isn't a result. Turn unavailable into invalid and you charge a business German VAT, then have to fix it with a credit note and a reissued invoice. Turn unavailable into valid and you issue a reverse charge invoice without proof.

When VIES doesn't answer at month end

An example: at 02:00 on the first of the month, the billing run starts for 60 reverse charge subscriptions. For 41 customers a confirmation from yesterday is on file. For 19 customers a scheduled re-check is due, and one member state's database isn't responding.

What a well-built system does, using an example policy you'd adapt to your own rules:

  1. The 41 invoices with a valid, recent enough proof are finalised normally.
  2. The 19 invoices stay as drafts. They're finalised neither without VAT nor with German VAT.
  3. The checks go into a queue with increasing intervals. The BZSt itself advises that during delays a new query at a different time of day works better than retrying immediately. Its page also mentions overnight maintenance windows, so 02:00 isn't a great time to run checks.
  4. If the check is still open after a set period, say 48 hours, a case opens for finance listing the affected customers and the open invoice amount.
  5. Finance decides: keep waiting, finalise using an older valid confirmation if the policy allows it, or exceptionally bill with VAT. The decision is stored with a name, a timestamp and a reason.

For this to work, the check can't hang synchronously inside the billing run. Re-check recurring customers ahead of the run, a few days before month end for instance, so an outage has time to clear.

What to store as proof

A validation record is its own immutable record, and the invoice points to it. At minimum it contains:

  • raw input and normalised number with country prefix
  • service used (VIES or BZSt) and type of query (simple or qualified)
  • timestamp in UTC
  • the result and, if returned, the name and address from the response
  • the original response: the received data record for the BZSt, the full VIES response including a consultation identifier if the service returns one
  • technical errors for unavailable
  • the version of the rule that turned the response into a status

Every reverse charge invoice line points to exactly one validation record whose timestamp precedes finalisation. The invoice itself carries the reverse charge statement; details are in the article on creating a reverse charge invoice. Keep the validation record for at least as long as the invoice it supports.

Store only what the check and the proof need. A debug log that makes full responses with names and addresses readable by everyone in the company is a GDPR problem, not proof.

When to check again

A check at onboarding isn't enough for a multi-year subscription. These triggers should start a new check:

  • The customer changes their number, company name or address.
  • Before a new customer's first reverse charge invoice.
  • The last valid proof is older than your agreed limit. That limit is a finance decision, not the cache lifetime of an HTTP client.
  • A customer adds their number after several invoices. New invoices from the successful check onwards are treated as reverse charge. Whether old invoices get corrected is for finance to decide, and the correction goes through new documents. For customers previously billed through OSS, the article on OSS quarter-close controls walks through it.

To get started, one query on your existing data is enough: all invoice lines without VAT whose customer has no stored validation record dated before the invoice date. If that list isn't empty, build the validation record and the statuses from the table first, then the retry logic. Kontier keeps the validation status and proof per customer in its European billing infrastructure and holds back reverse charge invoices without valid proof as drafts.

Not tax or legal advice. This post describes the law and common practice in general terms. For your own case, ask your tax adviser. As of:

Book a demo

A technical demo: 15 minutes with an engineer on your pricing model and tax setup.

How we handle your details: privacy policy.

Prefer email? contact@frontieralgorithmics.com

Message Kontier

Write to us right here. We reply by email, usually within one business day.

How we handle your details: privacy policy.

Personal invitation · 30 days

Try Kontier for 30 days, with a personal invite

We set up a trial account for you and send the invite personally. No credit card, the trial ends on its own.

Your invite arrives within 48 hours at the address you enter, sent by a person, not a script.

Separate from the public 14-day trial, which starts with a card on the pricing page.