Skip to content

Instantly share code, notes, and snippets.

@gelinger777
Forked from kgaughan/checkeuvat.py
Created May 30, 2022 10:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gelinger777/7b806b88a4442dac9ca47aee98830a53 to your computer and use it in GitHub Desktop.
Save gelinger777/7b806b88a4442dac9ca47aee98830a53 to your computer and use it in GitHub Desktop.
Checking an EU VAT number using the VIES SOAP interface
from suds.client import Client
client = Client('http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl')
# Returns a dict-like object with the fields 'countryCode', 'vatNumber',
# 'requestDate', 'valid' (boolean), 'name', and 'address'.
result = client.service.checkVat('IE', '6390845P')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment