RESTful validations of VAT numbers with vatid.eu

By Morten Møller Riis

February 28 2011 16:00 CET

Some time ago I needed to implement validation of European VAT numbers. Without going into too much detail it is a requirement when selling services VAT exempt (dealing with other businesses) within the European Union.

The EU provides the VIES service for this purpose. However, it is provided as either a form-based input or a SOAP web-service. For those of us that utterly hate SOAP web-services it would have been nice to have a RESTful web-service.

Not being pleased with the alternatives I quickly compiled my own RESTful web-service using SinatraRB and the ruby SOAP gem savon.

I put it up on a free Heroku account and bought a suitable (and short) domain for it vatid.eu.

It seems that a few people besides myself are actually using the service which ofcourse makes me very happy.

Today I added a few features to the service, namely better error handling and the feature to get the request-identifier token from VIES. The request-identifier token can act as a documentation for the local tax authorities that you have indeed verified the VAT number.

So if you haven’t already, take a look at vatid.eu and see if it fits your purpose. As always feedback and comments are highly appreciated.