Skip to content

Instantly share code, notes, and snippets.

@savex83
Forked from kgaughan/checkeuvat.py
Created August 20, 2020 21:19
Show Gist options
  • Save savex83/4c8924aafe3dd6335a58ad20538ac116 to your computer and use it in GitHub Desktop.
Save savex83/4c8924aafe3dd6335a58ad20538ac116 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