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.

Comments

[25/Jan/12 10:13] Morten Møller Riis

I’ve deployed a new version now.

Everything should work.

[24/Jan/12 21:29] Morten Møller Riis

It seems there are indeed problems right now. I am working on an update while I am writing this. But I don’t think I’ll have it online before tomorrow.

[24/Jan/12 20:43] Morten Møller Riis

You’re right. It does give some wierd replies. I am looking into it right now.

[24/Jan/12 20:28] olusola

it seems its returning false for every valid number