PS PrestaShop Intermediate

Intra-Community VAT VIES Validation & B2B Reverse Charge

Install and configure VIES verification, automatic reverse charge and the tamper-evident evidence journal.

Updated Module version 1.0.0

This module verifies intra-community VAT numbers against the European Commission’s VIES database, automatically applies the reverse charge (0% VAT invoice) for your business customers established in another EU country, and keeps a timestamped evidence journal — the record the tax authorities ask for during an audit.

The single most important setting is your own VAT number: without it, VIES does not issue an official consultation number, which is the strongest piece of evidence during an audit.

Requirements

  • PrestaShop 8.0 to 9.x, single-store or multistore.
  • PHP 7.4 to 8.3. The SOAP extension is recommended; otherwise the module automatically falls back to the VIES REST API.
  • Outbound HTTPS access to ec.europa.eu from your server.

Installation

  1. In the back office, go to Modules > Module Manager > Upload a module.
  2. Select the module ZIP file and run the installation.
  3. Click Configure once installation is complete.

Installation creates the consultation journal table and a VIES journal tab under the Orders menu.

Configuration

Your merchant VAT number

Enter your company’s VAT number in the dedicated field. As soon as it is present, each check queries VIES with a requester identifier: the database then returns an official, timestamped consultation number, enforceable against the authorities. This is the most important setting on the page.

Country of establishment

Enter the country you invoice from. The reverse charge only applies to customers established in another EU country: an order to your own country is taxed normally.

Enable exemption (reverse charge)

Turns the automatic switch to 0% VAT on or off. When off, checking and the journal keep working, but the tax is never changed — useful for an observation phase.

Real-time check

Enables the instant validation badge on the address form and, if you turn it on, on the registration field. The check fires as the customer types, with a short debounce delay.

Behaviour when VIES is unavailable

Two options:

  • Accept (default): the order goes through without applying the exemption. This is the commercially safest option — you do not lose the sale.
  • Block: validation fails until VIES confirms the number.

In both cases the outage is logged and can be re-checked later by the cron.

Validity, cache and revalidation windows

  • Validity: how long a valid journal entry allows the exemption without a new call.
  • Cache: how long a recent check is reused instead of calling VIES again.
  • Revalidation: the age beyond which the cron re-checks a number.

B2B customer group (optional)

If you choose a group, any customer whose VAT number is validated is automatically added to it — handy for applying B2B pricing or rules.

The reverse-charge mention printed on 0% invoices is customizable in all five languages. You can use the variables %vat% (customer VAT number), %date% (verification date), %consultation% (consultation number) and %name% (business name).

The customer-side check

When a customer enters their VAT number at checkout or registration, a badge appears: valid (with the business name returned by VIES), invalid, wrong format, or VIES unavailable. If the number is valid and the customer is established in another EU country, their order is invoiced tax-free.

The evidence journal

Every consultation is recorded under Orders > VIES journal: date and time, country, VAT number, result, business name, official consultation number, channel (address, registration, order, cron, manual) and IP address.

The journal is read-only: no deletion is possible, and the table is kept even after uninstalling the module. An audit trail is only worth anything if it is tamper-evident.

When an order is validated, an evidence snapshot is recorded and tied to the order number, linking every tax-free invoice to its proof. The VIES panel on the order page shows this status at a glance.

CSV export

From the journal screen, the export button generates a CSV file of every consultation, ready to hand over to your accountant or the authorities.

Automatic revalidation (cron)

The configuration page shows a token-secured cron URL. Call it once a day to re-check the VAT numbers whose last consultation is getting old. Each run processes up to 25 numbers.

Example crontab entry:

0 4 * * * curl -s "https://your-shop/index.php?fc=module&module=dfviesb2b&controller=cron&token=YOUR_TOKEN" > /dev/null

The reverse-charge mention is printed automatically on the PDF invoice, in the customer’s language, only when the invoice is genuinely issued at 0% VAT and a valid proof exists in the journal. No mention is added on a normally taxed invoice.

Troubleshooting

No consultation number appears

Check that your merchant VAT number is filled in: without it, VIES answers but does not issue an official consultation number.

The badge stays on “VIES unavailable”

The VIES service has regular outages on the European Commission’s side. Also check that your server can reach ec.europa.eu over HTTPS. The cron will catch up on unverified numbers.

The exemption is not applied

Make sure the customer is established in an EU country other than yours, that their number is valid and recent in the journal, and that the exemption is enabled in the configuration.

This module automates verification, exemption and evidence gathering. It does not replace your accountant: you remain responsible for your own tax obligations.

Was this page helpful?

Still stuck? Contact support