Skip to main content

UK VAT VERIFICATION SPIKE

  1. How to verify the UK VAT Number?
  2. Useful links
  3. Any constraints?

How to verify UK VAT Number:

We can verify the UK VAT number in two ways.

  1. From UK GOVT’s official website Welcome to GOV.UK (www.gov.uk)
  2. From UK GOVT’s public access API endpoints (offered for public usage)

Steps to verify VAT number for website direct:

  1. Open this link Check a UK VAT number - GOV.UK (www.gov.uk)
  2. Click on Start Now.
  3. Now enter the VAT TAX number and click search.
  4. If the VAT number is valid and registered, you can see the details related to the company registered.

Reference:

Steps to Verify VAT number from API:

  1. OAS for VAT verification endpoints: Check a UK VAT number - HMRC Developer Hub - GOV.UK
  2. Please use below CURL for test

CURL:

curl --location 'api.service.hmrc.gov.uk/organisations/vat/check-vat-number/lookup/836541127'
--header 'Accept: application/json'

Responses from API:

200 OK - TAX-Number is valid.

400 BAD REQUESTS – Invalid Tax number

Note: VAT Number should be either 9 digits or 11 digits only.

404 NOT FOUND – Invalid Tax number/Tax number doesn’t match with any registered business.

Any Constraints:

  1. Above endpoints for VAT Verification are Open access endpoint and doesn’t require any subscription/ licensing.
  2. Rate limiting -> 3 requests per second per application.

Back of the envelope:

Number of requests allowed without throttling. per second = 3, per minute = 60*3 = 180, per hour = 60*180 = 10,800

Existing data since last 8 months for country United Kingdom (GB): Total number of customers created/updated = 7503

Total number of Tax records created/updated = 4404

Note: Current requirement is to utilize the UK VAT only during customer creation.

Performance report:

Useful links:

  1. OAS -> Check a UK VAT number - HMRC Developer Hub - GOV.UK
  2. Verify VAT -> Check a UK VAT number - GOV.UK (www.gov.uk)
  3. API Reference Guide: Reference guide - HMRC Developer Hub - GOV.UK

Conclusion:

  1. We can use this endpoint without any license procurement.
  2. Based on existing data for UK country customers in production Rate limiter (at UK VAT Check endpoint) doesn’t affect the integration with our customer validation but has a risk of customer landing to workflow with VIES Flag during high peak.

Risk with Rate limiter: The UK VAT API contract explicitly permits a maximum of 3 requests per second. Consequently, if CMD experiences a surge in concurrent requests that surpasses this limit, it may result in the validation of VAT Numbers failing. In this peak scenario, customers will land in workflow with VIES flag.

Generally, the number of requests can be handled is as like below mentioned, but problem is only during high number of concurrent requests for customer creation, then VAT validation fails.

Can we reduce the count of failure at peak time? Yes, by implementing retry mechanism with 1sec delay but still has a risk of customer landing to workflow with VIES flag

per second = 3, per minute = 60*3 = 180, per hour = 60*180 = 10,800

As per existing production data, since last 8 months we only have 4404 VAT updates in system, if trend is like this then rate limiter doesn’t affect.

FYI Vinesh Asokan

Was this page helpful?