SERVICE_UNAVAILABLE VIES error: what it means and what to do

Retried by AvatcadoAvailability error
By Remco from Avatcado

SERVICE_UNAVAILABLE means VIES hit an error at the network or web application level and could not complete the check. The VAT number was not checked, so never treat the result as invalid. Retry with backoff, keep the result pending, and check the VIES status if the fault persists.

an error was encountered either at the network level or the Web application level, try again later

VIES checkVatService WSDL (fault list)

What it means

VIES documents SERVICE_UNAVAILABLE as an error encountered either at the network level or the web application level, and asks you to try again later. Where MS_UNAVAILABLE points at one member state's system, this fault points at no member state.

What causes it

The documentation goes no further than the network or the web application. The VIES check-status service reports the state of VIES itself in a vow.available flag next to the list of member states, so it is the first place to look when this fault appears.

How to handle it

  • Treat the result as unknown, never as invalid.
  • Call GET /check-status on the VIES REST API. If vow.available is false, the problem is VIES itself and no single member state.
  • Retry with backoff, stop after a bounded number of attempts, then queue the check.
  • Tell the user that VAT validation is temporarily unavailable and keep the order or signup pending.

What Avatcado does when VIES returns SERVICE_UNAVAILABLE

Avatcado retries SERVICE_UNAVAILABLE inside the same request, with a short pause and random jitter between attempts.

If VIES still has no answer, Avatcado asks the country's national tax register on the Pro and Business plans, for the 10 EU countries that have one (listed on the coverage page), and on every plan it falls back to the most recent stored result for that number. When neither can answer, the API returns a 503 with the code upstream_member_state_unavailable, and the call does not count against your quota. A check that ends in an availability error is never stored as an answer. A request that carries requester_vat_number skips both fallbacks by default, because a consultation number has to come from a completed VIES check.

How often Avatcado sees SERVICE_UNAVAILABLE

SERVICE_UNAVAILABLE was too rare in Avatcado's production traffic over the last 90 days to report figures for it.

Frequently asked questions

Is SERVICE_UNAVAILABLE caused by my request?

VIES uses a separate fault, INVALID_INPUT, for a request with an invalid country code or an empty VAT number. SERVICE_UNAVAILABLE is described as an error at the network level or the web application level, with the advice to try again later, so retrying the same request is the documented response.

How do I tell SERVICE_UNAVAILABLE apart from a member state outage?

By the code and by the check-status service. MS_UNAVAILABLE names the member state's application, and SERVICE_UNAVAILABLE does not. GET /check-status on the VIES REST API returns vow.available for VIES itself and an availability value for each member state, so you can see whether one country or VIES as a whole is affected.

Keep reading

Sources

Validate VAT numbers with the retries and fallback built in.

National register fallback on Pro and Business. Free tier: 500 validations a month.