'Validation of tax number through Xero API

I have been struggling for some time whether there is a way to validate if given tax number is a correct one. I have a form where customers enter their invoice data, but we create the invoice in the system when the payment arrives on our bank account.

That means if the vat id is wrong, Xero will return an error when create an invoice. I would like to validate the tax number on invoice data form, instead.

I have checked the API documentation, but I couldn't find anything there. Am I missing something?



Solution 1:[1]

I have an app that sends the contact informatiuon to Xero, and validate the VAT numbers first.

I do this using the VIES VAT SOAP Service.

https://www.programmableweb.com/api/vies-vat http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl

My code is in c#, so I just created a web reference via the wsdl and call it with the countryCode and vatNumber arguments.

Solution 2:[2]

You can also use https://tin-check.com/en/

They have an API that validate tax number for more than 100 countries https://api.tin-check.com/

Migth be a good alternative solution.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 sheavens
Solution 2 N Martins