• -10%
Checking the correctness of the NIP / VAT number for PrestaShop
Checking the correctness of the NIP / VAT number for PrestaShop
Checking the correctness of the NIP / VAT number for PrestaShop
Checking the correctness of the NIP / VAT number for PrestaShop
Checking the correctness of the NIP / VAT number for PrestaShop

VAT / VAT EU Number Validation Pro Module for PrestaShop

Module version: 1.6.6

PrestaShop compatibility: 1.7.x 8.x 9.x

Module file updated: 10/19/2026 17:03:24

Product data updated: 10/3/2026 04:22:10


1 Reviews

PD Check VAT Number Pro is a comprehensive solution for VAT number validation in PrestaShop 1.7.x – 9.x stores, which automatically checks the validity of EU VAT numbers (VIES) and Polish tax identification numbers (GUS API) during customer registration or address saving. The module’s unique feature is a configurable provider chain — you can set up to three verification services (VIES REST, VATcomply, VATLayer, viesapi.eu) with automatic fallback, so even if one of them is unavailable, validation continues without interruption. After successful verification, the module automatically applies a 0% VAT rate for intra-EU transactions in accordance with the reverse charge principle, freeing you from manually setting tax groups for each B2B customer. Each verification is cached (with configurable TTL per provider), which drastically reduces the number of requests to external APIs and speeds up checkout. The module integrates with the administration panel through an advanced dashboard showing validation statistics, provider telemetry, the history of recent checks, and chain status — the admin can immediately see which APIs are active and whether they require configuration. Optional features such as automatic customer group assignment after validation, administrator notification by email about a new B2B customer, revalidation when the order status changes, and full audit logs (compliant with GDPR requirements and tax regulations) make the module an essential tool for every store selling to businesses. The module is fully compatible with PHP 7.0 – 8.5 and PrestaShop 1.7.0 – 9.x, supports multistore mode (isolated cache per store), and works with any theme.

License type / update
zł 157.50
zł 128.05no tax zł 175.00 -10%
Lowest price in last 30 days before discount: zł 175.00

Description

Key features and benefits of the module

🌍 EU VAT validation — provider chain

  • VIES REST API (European Commission) — official EU service, free of charge, no API keys required, returns a consultation number compliant with regulations
  • VATcomply — free VIES proxy, limit of 2 requests/s/IP, no authentication
  • VATLayer (APILayer) — commercial API with high availability, requires an API key, returns full company data
  • viesapi.eu — Polish commercial VIES proxy with HTTP Basic Auth, fast response times
  • Configurable 3-slot chain — choose Provider 1 (primary), Provider 2 (backup), Provider 3 (last resort)
  • Automatic fallback — if the first provider returns an error or timeout, the module automatically tries the next one
  • Per-provider timeout and retry — configure separate time limits for each provider
  • Per-provider cache TTL — different cache validity periods for each API
  • Duplicate protection — JavaScript blocks selecting the same provider in 2 slots, server-side validation in PHP

🇵🇱 Polish NIP validation — GUS register

  • Integration with GUS BIR1.1 API — official government REGON register, free key from api.stat.gov.pl
  • Simple NIP checksum verification — weighted algorithm according to the official Ministry of Finance specification
  • Rejection of invalid patterns — all zeros, all ones, identical digits — blocked automatically
  • Checksum validation = 10 — according to the official NIP specification, the value 10 is invalid
  • Company data retrieval — name, address, postal code, city from the REGON register
  • Configurable timeout and retry — adjusted to the performance of GUS servers

💰 Automatic VAT exemption (0% reverse charge)

  • Automatic application of 0% VAT for verified B2B customers from EU countries
  • Configurable source country — exclusion of 0% for domestic transactions (compliant with VAT law)
  • List of countries for VIES verification — choose specific countries covered by validation
  • "Allow if validation fails" option — do not block registration in the event of a VIES outage
  • Integration with the PrestaShop tax engine via `TaxManagerInterface`

👥 Automatic customer group management

  • Auto-assignment to a group after validation — e.g. automatically add to the "B2B" or "VAT Exempt" group
  • Preservation of existing groups — the customer does not lose any of their current groups
  • Idempotent adding — no duplicates even with repeated validation
  • Group::isLoadedObject validation — safety for deleted groups

📧 Email notifications

  • Email to the admin on new B2B validation — immediate information about a new business customer
  • Email on re-validation failure — security alert when the VAT number is no longer valid
  • Multilingual templates (Polish, English) — editable in the standard PS editor
  • Configurable sender address — by default, the store email from PS settings

🔄 Re-validation on order status change

  • Automatic VAT re-check when the order changes to the selected status (e.g. "Payment accepted")
  • Compliance protection — detects situations where the VAT number expired between the order and shipment
  • Full audit log — every re-validation is saved with the VIES consultation number
  • Multishop-aware — uses the shop context from the order, not the current admin selector

📊 Professional admin dashboard

  • 5 dashboard sections — provider chain, validation statistics, recent validations, provider telemetry, quick start guide
  • Chain visualization — 3 slots with icons, names, status (active/disabled/no key)
  • 7 KPI cards — total, valid, invalid, last 7 days, VIES, GUS, cache entries
  • Table of the last 10 validations — VAT number, source, result, company, customer, date
  • Provider telemetry — per-provider success rate, number of checks, last call
  • Provider cards with FREE/PAID badges — clear information about costs
  • Automatic color coding — green (OK), orange (warn), red (error)

🏪 Full multistore support

  • Per-shop cache isolation — `id_shop` column in the cache table, composite UNIQUE key
  • Per-shop log isolation — audit per legal entity
  • Per-shop configuration — different providers, API keys, customer groups for each shop
  • Shop-aware re-validation — the hook uses the order context, not the admin context
  • Automatic default settings for all shops during installation

⚡ Performance and optimization

  • Two-level cache — static (in-memory) + persistent (database)
  • Negative cache — no repeated DB queries for unvalidated numbers
  • TTL enforcement on read — old entries are automatically ignored
  • Lazy dashboard rendering — statistics are calculated only on the Dashboard tab
  • Single aggregated SQL query — 6 COUNT(*) → 1 SUM(CASE WHEN)
  • Read replica for all reads (`_PS_USE_SQL_SLAVE_`)
  • Dedicated indexes — idx_date, idx_source, idx_shop
  • Log retention via CRON — automatic cleanup after a configurable period (default 365 days)

🔒 Security

  • CSRF tokens in all entry points (front, admin, CRON)
  • Timing-safe comparison (`hash_equals`) for token validation
  • Full SQL sanitization — `pSQL()`, `(int)`, `bqSQL()` everywhere
  • Smarty escaping — `htmlall:UTF-8` for all variables in templates
  • SSL verification — `CURLOPT_SSL_VERIFYPEER=true` in all provider calls
  • Provider whitelist — it is impossible to save an invalid provider in the chain
  • _PS_VERSION_ guard in every PHP file
  • AdminSecurity annotation in the Symfony admin controller

🛠️ Compatibility and dependencies

  • PrestaShop 1.7.0 – 9.x — full compatibility, versioned guards
  • PHP 7.0 – 8.5 — no modern syntax without guards
  • MySQL 5.6+ / MariaDB 10.x+ — utf8mb4 charset
  • Zero Composer / vendor — custom PSR-4 autoloader (15 lines of code)
  • Dual translation system — trans() + l() fallback works on all PS versions
  • Complete Polish translations — 200+ entries in pl.php and XLF files
  • Dual theme support — legacy (Smarty) and modern (Symfony) admin themes

👨‍💼 Admin panel — 10 tabs

  • Dashboard — dashboard with 5 sections, default tab
  • Settings — general validation options, ISO check, auto-group, cache TTL, re-validation
  • EU VAT settings — enable VIES, country list, 0% rate, allow on fail, source country
  • Provider chain — 3 selects with JavaScript blocking duplicates
  • VIES REST — timeout, cache TTL, retry (no keys)
  • VATcomply — timeout, cache TTL, retry (no keys)
  • VATLayer — API key, timeout, cache TTL, retry
  • viesapi.eu — identifier, access key, timeout, cache TTL, retry
  • GUS configuration — enable, country, user key, allow on fail, timeout, cache TTL, retry
  • Tools — CRON URL for cleaning cache and logs

🎯 Who is this module for?

  • PrestaShop stores selling to businesses (B2B) in the European Union
  • Sellers issuing reverse charge invoices
  • Stores serving the Polish market requiring NIP verification in GUS
  • Multistore platforms with different legal entities per shop
  • Sellers needing a VAT validation audit compliant with tax regulations
  • Stores with a high volume of B2B transactions requiring cache and high availability

Product Details

Prestashop 9.x support
Yes
Support for Prestashop 8.x
Yes
Prestashop 1.7.x support
Yes
Module translations
EN, EN
Free support
Yes
Free updates (1 year)
Yes
Easy Installation
Yes
Requires engine modification
No
Minimal PHP version
PHP7.1.X
PDCVNP-FULL

You might also like

Changelog

Release history for this product. Expand an entry to see what changed.

  • dodano kilka nowych opcji

  • poprawki z VIES i VAT 0 % w niektórych sytuacjach nie ustawiało stawki 0%

  • EU VAT provider chain system (VIES REST, VATcomply, VATLayer, viesapi.eu)
  • Configurable 3-slot provider priority with automatic fallback
  • Provider-specific settings (timeout, cache TTL, retry) per provider
  • JavaScript duplicate prevention on chain provider selects
  • New admin tabs: Dashboard, EU VAT Settings, Provider Chain, VIES REST, VATcomply, VATLayer, viesapi.eu
  • Professional dashboard with 5 sections (chain flow, stats, recent validations, provider telemetry, quick start guide)
  • Per-tab configuration save (replaces single-transaction save)
  • PSR-4 autoloader for Symfony admin controller (zero Composer dependency)
  • NIP checksum rejection for all-zero and all-identical-digit sequences

  • poprawiono błąd z cache dla numerów nip

  • dodano kompatybilność z PrestaShop 9.x
  • dodano obsługę nowego systemu tłumaczeń

FAQ

Find answers to the most common questions about this product.

The module automatically verifies EU VAT numbers and Polish tax identification numbers during customer registration or address saving in your PrestaShop store. After successful validation, the module automatically applies a 0% VAT rate for business customers from the European Union in accordance with the reverse charge principle. All results are cached, which speeds up checkout and reduces the number of requests to external APIs.

The provider chain is a configurable sequence of up to 3 services verifying VAT numbers: VIES REST (European Commission), VATcomply, VATLayer, and viesapi.eu. When the first provider returns an error or times out, the module automatically tries the second, and then the third. Thanks to this, validation works without interruption even when one of the services is temporarily unavailable. You can set the order in the Provider Chain tab — JavaScript blocks selecting the same provider in multiple slots.

No — two providers work without any keys: VIES REST (the official service of the European Commission) and VATcomply (a free proxy to VIES). You just need to add them to the chain and they will work immediately after installation. VATLayer and viesapi.eu are paid premium services that require an API key — they are optional and provide additional reliability and higher query limits. For most stores, the free providers are more than sufficient.

The module integrates with the official GUS BIR1.1 API (REGON register). To use this feature, you must generate a free user key on the api.stat.gov.pl/Home/RegonApi website and paste it into the GUS Configuration tab. Once the feature is enabled, every Polish VAT number will be automatically verified in the official register, and the module will retrieve the company name, address, and postal code. Additionally, the module performs the VAT number checksum locally — it rejects invalid patterns such as 0000000000 or all ones.

Yes — after successful verification of the VAT number in the VIES system, the module automatically applies a 0% VAT rate for intra-Community transactions in accordance with the reverse charge principle. The mechanism integrates with the PrestaShop tax engine via TaxManagerInterface. You can configure the source country (e.g. Poland) — for domestic transactions, the standard VAT rate will be maintained even if the customer has a valid EU VAT number. Select the list of countries covered by validation in the EU VAT Settings tab.

In the Settings tab, you can enable the Automatic group assignment after VAT validation option and select the target group (e.g. B2B or VAT-exempt). After successful verification of the VAT number by VIES or GUS, the customer will be automatically added to the selected group. The customer's existing groups are preserved — only the new one is added. The function is idempotent, so repeated validation does not create duplicates. Useful for creating dedicated price lists or categories only for business customers.

No — the module is optimized for performance. It uses a two-level cache (static in-memory + persistent in the database) with a configurable TTL per provider. The first VAT number check calls the API, all subsequent ones read from the cache (result ~0 ms). The module uses a read replica (_PS_USE_SQL_SLAVE_) for database queries, dedicated SQL indexes, and a negative cache preventing repeated queries for unvalidated numbers. The admin dashboard renders statistics only when you are on the Dashboard tab — not on other tabs.

This feature automatically rechecks the customer's VAT number when the order reaches the selected status (e.g. Payment accepted or In progress). If the VAT is no longer valid between the time the order is placed and shipment — the module will save a warning in the log and send an email to the administrator. Useful for ensuring tax compliance at the time of payment acceptance or shipment. The feature is optional — you can enable it in the Settings tab.

Yes — the module is fully multistore-aware. The cache and validation log tables contain the id_shop column, so the same VAT number can be validated independently for different shops (e.g. one PL shop, another DE shop). Each shop can have its own configuration — different providers, API keys, customer groups, or VIES countries. The order status change hook uses the shop context from the order, not the one currently selected by the admin. During installation, the module automatically sets default values for all active shops.

The Dashboard (default tab) contains 5 sections: (1) a visualisation of the provider chain with icons and the status of each slot, (2) 7 KPI cards with validation statistics (total, valid, invalid, last 7 days, VIES, GUS, cache entries), (3) a table of the last 10 validations with VAT number, source, result, company and date, (4) provider telemetry with success rate and number of checks per provider, (5) a quick start guide with a description of each provider and FREE/PAID badges. You can immediately see whether the module is working correctly and which APIs are active.

The module caches validation results in the pdcheckvatnumberpro_cache table with a configurable TTL (default: 30 days for results, configurable in the Settings tab). After the TTL expires, old entries are ignored when reading and removed by the CRON job. In the Tools tab, you will find the CRON URL, which you can add to your server schedule (e.g. once a day) — it automatically clears expired cache entries and old validation logs (default retention: 365 days). The URL contains a security token, so it cannot be called without authorization.

Yes — the module supports two types of notifications. The first: an e-mail to the administrator for each new successful B2B validation (the option is enabled in the Settings tab) — useful for stores that want to manually verify new business customers. The second: a security alert when revalidation during an order status change returns a failure (the VAT number is no longer valid). The e-mail templates are available in the mails/ directory in two languages (Polish, English) and you can edit them in the standard PrestaShop editor.

The module works with PrestaShop from version 1.7.0 up to the latest 9.x, and with PHP from version 7.0 to 8.5. It supports both the classic administration theme (Smarty) and the new Symfony theme in PrestaShop 8 and 9. It integrates with the PS 1.7.5+ customer grid via ToggleColumn (with a class_exists guard for older versions) and with PS 8 via the Symfony admin controller. It does not require any external libraries or Composer — the module has its own lightweight PSR-4 autoloader (15 lines of code) and zero vendor dependencies.

The module includes an option Allow registration if VIES validation fails (enabled by default) — then the customer will proceed even if all providers returned an error or timeout. This protects the checkout against external API failures. Each failure is saved in the log with information about the provider and the error, so you can analyse the history. Similar options are available for GUS (allow if fail) and simple NIP checksum validation. You can also set Provider 1 and 2 as active, and Provider 3 as none — then there will be only 2 attempts.

Yes — the module has passed a full security audit (SQL injection, XSS, CSRF, timing-safe comparison). All endpoints (front AJAX, CRON, admin Symfony) verify CSRF tokens via hash_equals. SQL data is sanitized using pSQL, (int), and bqSQL. Smarty templates use escape:htmlall:UTF-8 for all variables. cURL calls have CURLOPT_SSL_VERIFYPEER=true. Validation logs contain only the VAT number, result, date, and optionally the company name from the public register — without any customer personal data other than id_customer. Log retention is configurable (365 days by default) and automatically cleaned up by CRON.

Reviews (1)

1 Reviews

Dobre rozwiązanie
długo szukaliśmy modułu do weryfikacji polskich numerów VAT / NIP i w końcu się udało :-) dziękujemy
By on 10/27/2022