Skip to content

VIES VAT Validator

VIES VAT Validator is a Paymenter extension for hosting providers who sell to businesses in the EU. Your customers enter their VAT ID on a page in their account. The extension checks the number against VIES, the VAT number validation service of the European Commission, and stores the answer for each customer. You see all stored VAT IDs in the admin area and can repeat the check there.

Customer page with a validated VAT ID

What it does

  • Customer page. Every logged-in customer can open /account/vat, enter a VAT ID, validate it, change it and remove it. A box with a Manage button on the account page links to it.
  • Check against VIES. The lookup goes from your server to the VIES REST API at ec.europa.eu over HTTPS, with a 5 second connect timeout and a 10 second response timeout.
  • Check before the lookup. The input is normalised (everything except letters and digits is removed, letters are upper-cased) and must be a two-letter country code followed by 2 to 12 letters or digits. Numbers that fail this check, or whose country code VIES does not cover, are rejected without a lookup.
  • Stored result. One record per customer in the table ext_vies_vat: VAT ID, country code, validity, company name, company address, a reverse-charge flag, the time of the check and the last error.
  • Outages are not treated as "invalid". If VIES cannot be reached, times out, answers with an error or reports that a member state is unavailable, the stored validity is left as it is and only the error message is saved.
  • Admin list. VAT Validations in the Extensions navigation group lists every record, with search by customer e-mail and VAT ID and a Revalidate action.

What it does not do

  • It does not change taxes, prices or invoices. The reverse-charge flag is stored and displayed only. Paymenter's tax calculation is not touched.
  • It does not ask for a VAT ID during registration or checkout.
  • It does not recheck stored VAT IDs on a schedule and sends no e-mails.

Requirements

  • Paymenter 1.5.x. The extension was developed and tested against Paymenter 1.5.8.
  • PHP 8.3 or 8.4.
  • Outbound HTTPS access from the Paymenter server to ec.europa.eu.

Pages

  • Installation: upload, enable, update and uninstall.
  • Configuration: there are no settings; this page lists the fixed values and the stored fields.
  • Usage: the customer page, the admin list and every possible result of a check.
  • FAQ: common questions and troubleshooting.
  • Changelog