← thoughts/systems & odoo

How we gated a European B2B store on live EU VIES VAT checks.

In B2B wholesale, public prices ruin your retailers' margins and manual account approvals lose weekend buyers. Here is how we wired live EU VIES VAT verification into an Odoo B2B storefront.

26 October 20266 min readby the Qann team

If you sell wholesale across the European Union, you run into two problems on day one.

First, you cannot put your trade prices on the public internet. The moment a retail customer sees what your wholesale buyer pays for a unit of hardware, you undercut every distributor and shop you supply.

Second, if you hide your prices behind a traditional "Request a Wholesale Account" form that lands in someone's inbox on a Friday afternoon, the buyer has already ordered from a competitor by Monday morning.

When we built the European B2B portal for Empty Vapes (shop.emptyvapes.com) on Systems & Odoo, we needed both problems gone at once: zero public wholesale pricing, and zero waiting for a human to copy-paste a VAT number into a government website.

A B2B gate should stop consumers, not buyers with a credit card and a valid VAT number in hand.

01Why manual B2B onboarding breaks across 27 countries

In European cross-border B2B trade, a valid VAT number registered in the European Commission's VIES (VAT Information Exchange System) database does two jobs at once:

  1. It proves the buyer is a registered business entity in one of the 27 EU member states.
  2. It determines whether the invoice carries domestic VAT or qualifies for a 0% intra-community reverse-charge supply (Article 138 of the EU VAT Directive).

Most SMEs handle this with duct tape. A customer fills out a Typeform or WooCommerce registration form. Someone in ops opens the Europa VIES web page, types in the number, checks the company name, manually flips a customer tag in Shopify or WooCommerce, and sends a welcome email.

That workflow has three failure modes:

  • Weekend drop-off: B2B founders and purchasing managers often source suppliers on evenings and weekends. If they cannot see unit tiers (500 units vs 2,500 units vs 5,000 units) immediately, they bounce.
  • Invoice tax errors: If a buyer registers with a typo in their VAT number and the store is not connected to the ERP's fiscal positions, the checkout either charges 21% Dutch VAT when it should charge 0% reverse-charge, or worse, ships 0% VAT to an unverified number and leaves the seller liable during a tax audit.
  • Two databases: When the storefront lives in one tool and the ERP lives in another, approved trade accounts drift out of sync with accounting partner records.

02Putting the storefront and the VIES gate in one Odoo database

Because shop.emptyvapes.com runs directly on Odoo's e-commerce and portal engine rather than a separate CMS bolted onto an ERP, the website visitor and the accounting res.partner record are the same row in the same PostgreSQL database.

Here is the exact sequence we wired into the account sign-up flow:

  1. Public catalogue, locked price list: Anonymous visitors can browse all six hardware categories, read the CE compliance specs, and see the 500-unit minimum order quantity (where container-only competitors start at 5,000 to 10,000 units). Where the price sits, they see a single prompt: Open a free trade account with your EU VAT number to unlock tiered trade pricing.
  2. Live VIES lookup on submit: When the buyer enters their country prefix and VAT number (NL..., DE..., FR..., CZ...), Odoo calls the European Commission VIES SOAP/REST endpoint in real time.
  3. Automatic partner enrichment & pricelist assignment: When VIES returns valid: true, the system writes the registered legal company name and address onto the Odoo partner record, assigns the B2B Wholesale Pricelist, maps the EU Intra-Community Fiscal Position, and logs the VIES consultation timestamp for audit proof.
  4. Instant price unlock: Within seconds of submitting the form, the buyer is inside the store seeing tiered EUR pricing for 500, 1,000, and 5,000 units, with automatic 0% intra-community reverse-charge VAT applied at checkout.

03Handling the failure mode nobody warns you about: VIES downtime

Anyone who has integrated with the EU VIES API knows its dirty secret: individual member-state tax databases (especially Germany and Italy during nightly maintenance windows) return MS_UNAVAILABLE or timeout errors several times a week.

If your signup form treats a VIES timeout as an invalid VAT number, you reject legitimate buyers every time a national tax server hiccups.

Never let a government API timeout look like a customer error.

We separated VIES responses into three explicit states instead of two:

  • VALID: Unlock trade pricing and intra-community fiscal position immediately.
  • INVALID (syntax or explicit VIES rejection): Show a clear inline message asking the buyer to check the country prefix and digits.
  • MS_UNAVAILABLE / Timeout (member state offline): Validate the country's mathematical checksum locally, let the buyer into a provisional trade view so they can build their cart, and flag the partner record in Odoo for an automated background VIES retry + human ops check before the proforma invoice is finalized.

04What changed in the operation

Before moving the B2B portal onto Odoo with live VIES gating, every new wholesale inquiry required 15 to 20 minutes of manual back-and-forth across email, the VIES website, and accounting.

After the build:

  • Qualified EU companies go from landing page to unlocked tiered trade pricing in under 60 seconds, 24/7.
  • Every B2B order lands directly in Odoo Sales, Inventory, and Accounting with the verified VAT number and VIES audit reference already attached.
  • Customs is cleared on the supplier side, and the buyer gets a single compliant EUR invoice across all 27 EU member states.

If your wholesale team is still checking VAT numbers by hand or maintaining a separate B2B plugin that fights your accounting software, look at how we scope Systems & Odoo and E-commerce builds.

- Qann Commerce, Tallinn / Eindhoven / Mumbai

Written by the Qann team · Tallinn · Eindhoven · Mumbaishare on linkedin

$ ./gate_my_b2b_store

Selling B2B
in Europe?

Tell us how your wholesale orders and VAT checks run today. We'll tell you what it takes to put the catalogue, the VIES gate, and invoicing into one Odoo system.