Why WooCommerce VAT validation is more complex than it looks
If you run a WooCommerce store selling to EU businesses, you likely need to zero-rate cross-border B2B sales. The standard flow is: customer enters their VAT number at checkout → you validate it → you issue an invoice without VAT.
The plugins that handle this are widely used and generally reliable at the validation step. The problem is what happens after: you have a record of "valid: true" but no proof that you checked. In a VAT audit, your accountant or tax authority will ask for evidence — specifically, the VIES consultation number for each zero-rated invoice.
This guide covers what the major WooCommerce VAT plugins do, where they stop, and how to close the audit-proof gap.
The major WooCommerce EU VAT plugins
EU VAT Number (by WooCommerce / Automattic)
The official WooCommerce extension. Validates VAT numbers via VIES at checkout, stores the VAT number on the order, and removes tax when valid. Widely used and well-maintained.
⚠️ Audit gap: stores validation result (valid/invalid) but not the VIES consultation number. No fallback when VIES is down — validation simply fails. No audit log export.
WooCommerce EU/UK VAT Compliance (by ReallySimplePlugins)
More comprehensive than the official plugin. Handles EU + UK VAT, OSS compliance, VAT number validation, and has some audit logging. Better suited for high-volume B2B stores.
⚠️ Audit gap: validates via VIES but does not retrieve or store consultation numbers. Audit log records the validation outcome, not the formal evidence reference.
YITH WooCommerce EU VAT
Handles VAT number collection and validation at checkout, VAT exemption logic, and order metadata storage. Integrates with YITH's other plugins.
⚠️ Audit gap: same as above — validates via VIES but does not retrieve consultation numbers.
What the consultation number gap means in practice
If your store is based in Germany and you zero-rated 200 invoices to EU business customers over the past year, and you get a VAT audit, the auditor will ask you to prove each zero-rating. The expected evidence is: "VAT number DE123456789 was valid at the time of sale, and the consultation number for that check is WAPIAAAAW1234567."
If you cannot produce consultation numbers — because your WooCommerce plugin didn't retrieve them — you have two options:
- Re-run VIES queries retroactively for each order (the numbers will be different, and some VAT numbers may have changed status).
- Accept that your zero-rating may be challenged, potentially resulting in a back-tax liability plus penalties.
Solution: integrate Vatnode at the order level
Vatnode provides a REST API that retrieves the consultation number as part of the validation response and stores it in an exportable audit log. Integrating it with WooCommerce takes one of two approaches:
Option A: Custom validation hook (developer)
Replace the VIES call in your existing plugin with a Vatnode call using the woocommerce_eu_vat_number_validate filter. Store the consultation_number in order meta.
// In functions.php or a custom plugin:
add_filter('woocommerce_eu_vat_number_validate', function($result, $vat_number) {
$response = wp_remote_post('https://api.vatnode.io/v1/validate', [
'headers' => [
'Authorization' => 'Bearer ' . get_option('vatnode_api_key'),
'Content-Type' => 'application/json',
],
'body' => json_encode([
'vat_number' => $vat_number,
'requester_vat' => get_option('your_own_vat_number'),
]),
]);
$data = json_decode(wp_remote_retrieve_body($response), true);
// Store consultation number in session for order meta
WC()->session->set('vatnode_consultation', $data['consultation_number'] ?? '');
WC()->session->set('vatnode_audit_id', $data['audit_log_id'] ?? '');
return [
'valid' => $data['valid'] ?? false,
'company' => $data['company']['name'] ?? '',
];
}, 10, 2);
// Save to order meta on order creation:
add_action('woocommerce_checkout_order_created', function($order) {
$cn = WC()->session->get('vatnode_consultation');
if ($cn) {
$order->update_meta_data('_vatnode_consultation_number', $cn);
$order->update_meta_data('_vatnode_audit_log_id', WC()->session->get('vatnode_audit_id'));
$order->save();
}
});
Option B: Webhook-based (no-code / low-code)
Use WooCommerce webhooks to send new orders to a middleware (n8n, Zapier, Make) that calls the Vatnode API and stores the consultation number back on the order via the WooCommerce REST API. Useful if you don't want to modify plugin code.
Audit log export for your accountant
Once consultation numbers are stored in Vatnode's audit log (and optionally in WooCommerce order meta), you can export the full validation history as CSV or JSON at any time. Hand this to your accountant alongside your invoices and the two documents together form a complete audit trail for each zero-rated sale.
Summary: what a compliant WooCommerce B2B setup looks like
- Customer enters VAT number at checkout.
- Vatnode validates the number, retrieves the consultation number, falls back if VIES is down.
- Consultation number and Vatnode audit log ID stored in WooCommerce order meta.
- Zero VAT applied to the order.
- Invoice generated with the validated VAT number on it.
- Monthly or annual export of Vatnode audit log provided to accountant.
Steps 1 and 5–6 are already handled by most WooCommerce setups. Steps 2–4 are what Vatnode adds.
Add consultation numbers to your WooCommerce store
Free up to 100 validations/month. EU-hosted. GDPR-compliant.
Get your free API key →FAQs
Does the WooCommerce EU VAT Number plugin work without modification?
For basic checkout validation it does. For audit-proof compliance with consultation numbers, you need to extend it (Option A above) or use Vatnode's webhook approach. The core plugin continues to handle tax exemption logic — Vatnode only replaces the validation API call.
What if a customer's VIES check fails at checkout?
Vatnode automatically falls back to the national registry. If the national registry also fails, the response indicates the validation was inconclusive. In this case you should either not apply zero-rating, or request the customer's VAT certificate another way and manually log the check.
Do I need a consultation number for every order?
Best practice is to validate at first purchase, store the result, and re-validate periodically (annually, or when a subscription renews). You do not necessarily need a new consultation number for every invoice if you validated recently and stored the prior result. Check with your accountant for jurisdiction-specific guidance.
Is this applicable to UK VAT as well?
No — post-Brexit, UK VAT validation uses HMRC's VAT number checker API, not VIES. Vatnode currently covers EU VAT numbers only (the 27 EU member states).