VAT (European Union VAT number).
The European Union VAT number consists of a 2 letter country code (ISO 3166-1, except Greece which uses EL) followed by a number that is allocated per country.
The exact format of the numbers varies per country and a country-specific check is performed on the number using the VAT module that is relevant for that country.
>>> compact('ATU 57194903')
'ATU57194903'
>>> validate('BE697449992')
'BE0697449992'
>>> validate('FR 61 954 506 077')
'FR61954506077'
>>> guess_country('00449544B01')
['nl']
Queries the online European Commission VAT Information Exchange System (VIES) for validity of the provided number. Note that the service has usage limitations (see the VIES website for details). This returns a dict-like object.
Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.
The collection of country codes that are queried. Greece is listed with a country code of gr while for VAT purposes el is used instead.
Guess the country code based on the provided number. This checks the provided number against each of the validation routines and returns the list of countries for which it is valid. This returns lower case codes and returns gr (not el) for Greece.
Checks to see if the number provided is a valid VAT number. This performs the country-specific check for the number.
Checks to see if the number provided is a valid VAT number. This performs the country-specific check for the number.
The WSDL URL of the VAT Information Exchange System (VIES).