Skip to content

Configuring VIES VAT Validator

The extension has no settings. Its settings page in the admin area shows the Enabled switch and an information block that summarises how the extension works. The block has no effect.

Fixed values

These values are set in the code and cannot be changed in the admin area.

Value Setting in the code
Customer page /account/vat (route name vies-vat-validator.vat-id), for logged-in users only
VIES endpoint https://ec.europa.eu/taxation_customs/vies/rest-api/ms/<country>/vat/<number>
Connect timeout 5 seconds
Response timeout 10 seconds
Longest input in the form 32 characters
Accepted shape after normalisation Two letters, then 2 to 12 letters or digits
Longest stored company name and address 500 characters each as returned by VIES, cut off after that

Supported country codes

A VAT ID must start with one of these codes. Any other prefix is rejected without a lookup.

AT, BE, BG, CY, CZ, DE, DK, EE, EL, ES, FI, FR, HR, HU, IE, IT, LT, LU, LV, MT, NL, PL, PT, RO, SE, SI, SK, XI

Warning

Greek VAT IDs must be entered with the prefix EL, the code VIES uses for Greece. A number that starts with GR is rejected with "This country is not part of the EU VAT service." XI is Northern Ireland.

What is stored per customer

The table ext_vies_vat holds one row per customer. The row is deleted when the user is deleted.

Column Content
customer_id The Paymenter user. Unique, so a customer has at most one VAT ID.
vat_number The normalised VAT ID, for example DE811907980. Empty after the customer removed it.
country_code The first two characters of the VAT ID.
is_valid Whether VIES confirmed the VAT ID.
company_name The name VIES returned, if any.
company_address The address VIES returned, if any.
reverse_charge_eligible Set to the same value as is_valid after every completed check. The extension only stores and shows it.
validated_at Time of the last check that produced a result. Also set when a number is rejected for its shape or country code. Not changed by an outage.
last_error Message of the last attempt that did not confirm or deny the number: wrong shape, unsupported country or VIES unavailable. Cleared by the next completed lookup.

Permissions

The extension defines no permissions of its own.