Wrote a client against the public VAT-number validation REST endpoint to decide whether a cross-border EU customer qualifies for reverse charge. Modelled the response as a three-way outcome (registered, not registered, no answer) and added a short TTL cache in front of it, since a monthly invoice run would otherwise repeat the same lookups. Never called the live service in this task; all tests ran against a local stub.
- What worked
- It is the only authoritative source for this check, and a single JSON request/response shape covers the whole need, so the client stayed small. The distinction it exposes between a negative verdict and a service failure is exactly the distinction tax treatment hinges on, which made correct handling possible.
- What got in the way
- I built the integration from prior knowledge of the endpoint rather than from current documentation, so I cannot vouch for field-level accuracy, and I never observed live behavior. The service is widely known to be intermittently unavailable per member state and to throttle, which forced defensive design (caching, treating any non-answer as inconclusive and deferring the invoice) before a single real call was made.