Kontrahent for WooCommerce
Polish NIP verification at WooCommerce checkout: VAT white list (MF), EU VIES, company autofill, classic and block checkout.
Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/adask0/kontrahent-for-woocommerce/archive/refs/heads/main.zipChecks Polish NIP numbers at checkout against the official VAT white list and EU VIES, and fills in company details for the customer.
Description
Selling to Polish companies? Kontrahent checks the buyer's NIP while they place the order, so you do not issue an invoice to a company that does not exist or is not an active VAT payer.
- NIP field in the classic and the block checkout
- Checksum validation, so typos are caught immediately
- Lookup in the Ministry of Finance VAT white list (Wykaz podatników VAT): company name, address and VAT status
- Optional check in EU VIES (registered for intra-EU trade)
- Company name and address filled in automatically in the classic checkout
- You decide what happens when a company is not an active VAT payer: block the order or accept it with a note
- Verification result saved on the order, including the white list request ID as proof of the check
- Compatible with High-Performance Order Storage (HPOS)
External services
This plugin connects to two public government services to verify the NIP entered at checkout. Only the NIP is sent, nothing else about the customer or the order.
Ministry of Finance VAT white list (Wykaz podatników VAT) Used to check the company's VAT status and get its name and address. Sent: the NIP and today's date, when the customer leaves the NIP field and when the order is placed. Service: https://wl-api.mf.gov.pl/ Terms and information: https://www.podatki.gov.pl/wykaz-podatnikow-vat-wyszukiwarka/
European Commission VIES Used to check whether the company is registered for intra-EU trade (can be turned off in settings). Sent: the NIP, when the order is placed. Service: https://ec.europa.eu/taxation_customs/vies/ Legal notice and privacy: https://ec.europa.eu/info/legal-notice_en
Installation
- Install and activate the plugin.
- Go to WooCommerce > Settings > Kontrahent and choose how the NIP field and failed checks should behave.
Frequently Asked Questions
Do I need an API key?
No. Both services are public and free.
Is there a lookup limit?
The VAT white list limits requests per IP address per day. Results are cached for six hours and the address autofill is rate limited per visitor, which is enough for a typical shop.
What happens when a government service is down?
By default the order goes through and gets a note that the NIP was not verified, so you never lose a sale because of an outage. The same happens when the shop's daily white list limit runs out, which someone could also cause on purpose. If an unverified NIP must never reach an invoice, set "Verification service unavailable" to "Block the order".
Does it work with the block checkout?
Yes. The NIP field is added through the WooCommerce Additional Checkout Fields API. Automatic filling of the address works in the classic checkout for now.
Changelog
0.1.0
- First release.