Skip to content

Installing VIES VAT Validator

Upload the files

The extension must end up in this folder of your Paymenter installation. The folder name must be exactly ViesVatValidator.

extensions/Others/ViesVatValidator/

You can get it there in two ways.

Upload the ZIP in the admin area

  1. In the admin area, open Extensions, then Available Extensions.
  2. Switch to the Ready to Install / Upload tab.
  3. Click Upload Extension, choose the ZIP file and confirm.

Copy the folder by hand

  1. Unpack the ZIP and copy the ViesVatValidator folder to extensions/Others/ViesVatValidator/.
  2. If the extension does not show up in the next step, run these commands in the Paymenter root directory:

    composer dump-autoload
    php artisan optimize:clear
    

Install and enable

  1. Open Extensions, then Available Extensions, tab Ready to Install / Upload.
  2. Find VIES VAT Validator (Jube Hosting) and click Install. Paymenter opens the extension's settings page.
  3. Switch on Enabled and save.

Installing and enabling both run the extension's migration, which creates one table: ext_vies_vat.

Once the extension is enabled:

  • the admin area has a new entry VAT Validations in the Extensions navigation group,
  • customers can open /account/vat,
  • the customer account page (/account) shows an EU VAT ID box with a Manage button that leads to that page.

First-time setup

There is nothing to configure. Check one thing: the Paymenter server must be able to reach the VIES API over HTTPS. Run this on the server:

curl -s "https://ec.europa.eu/taxation_customs/vies/rest-api/ms/DE/vat/811907980"

The answer must be JSON that contains a boolean isValid field. If it is not, check firewall rules and DNS, and for containers that outbound HTTPS is allowed.

Updating

  1. Upload the new ZIP with Upload Extension as described above. Paymenter replaces the extensions/Others/ViesVatValidator folder and calls the extension's upgrade step, which runs any new migrations.
  2. If you replace the folder by hand instead, disable and re-enable the extension afterwards. Enabling runs any new migrations.

Stored VAT IDs are kept.

Uninstalling

  1. Open the extension's settings page in the admin area.
  2. Click Uninstall Extension and confirm.

Warning

Uninstalling drops the ext_vies_vat table. Every stored VAT ID and validation result is deleted.

To keep the data, disable the extension instead. Disabling keeps the table. While the extension is disabled, /account/vat returns a 404, the EU VAT ID box is not shown on the account page, VAT Validations is not in the admin navigation and no lookups are made.