Categories
Internet PHP

EU VAT API, validate VAT number, get rates and more!

Hello!!!

Today I am launching my latest small project 😉 As you know a while ago I talked about the new VAT Rules and MOSS. And I found some nice utilities and APIS, most of them are not FREE so I decided to build one and share it!

EUVAT.ga

This is a FREE to use without limitations API microservice, to validate EU VAT numbers, calculate rates, get EU rates, detect customer country and VAT etc..

I have built it using Laravel “Microframework” Lumen so I could learn a bit more about laravel and also provide a tool that I will also use for our projects.

I use other components as GEOIP to detect visitors country and APC to cache the results when we query the european database.

API ENDPOINTS

  • Get company info https://euvat.ga/api/info/VATNUMBER
  • Validate VAT Number https://euvat.ga/api/validate/VATNUMBER
  • Get all European VAT rates https://euvat.ga/rates.json
  • Get rate for a specific country https://euvat.ga/api/rate/COUNTRYCODE
  • Is European country? https://euvat.ga/api/iseu/COUNTRYCODE
  • Get VAT by IP https://euvat.ga/api/ip/IPADDRESS
  • Get VAT by IP auto detect https://euvat.ga/api/ip/detect
  • Calculate amount to pay https://euvat.ga/api/calc/COUNTRYCODE/AMOUNT

Country code needs to be in ISO 3166-1 alpha-2, Example ES=Spain, DK=Denmark etc. List here.

If you are a Developer, you can use the API points or you can download the source code and run it on your server. All for FREE!

Download/See Code at GitHub