Chat on WhatsApp

How do I validate KMKR (Estonian VAT-ID) + VIES for EU B2B in Magento?

KMKR (käibemaksukohustuslane) is the Estonian VAT-ID, format EE + 9 digits (e.g. EE100123456). It’s assigned by Maksu- ja Tolliamet (Maksuamet), the Estonian Tax and Customs Board.

Two layers of validation for Magento B2B:

  1. KMKR existence + status, validated against Maksuamet’s public web service. Tells you the company name, address, and whether the KMKR is currently active (companies can lose KMKR status if they fall under the registration threshold or fail tax filings).
  2. VIES (EU VAT Information Exchange System), the EU-wide validator for cross-border B2B. For intra-EU B2B sales, the buyer’s VAT number must validate on VIES and the seller must report the sale on a VD declaration (käibedeklaratsiooni lisa).

For Magento we:

  • Add a KMKR field to the customer entity (or B2B company on Adobe Commerce).
  • On registration, hit Maksuamet first (faster, gives you company name + address auto-fill); if EE-format, treat it as valid Estonian KMKR.
  • For non-EE EU VAT-IDs, hit VIES directly.
  • Apply 0% Käibemaks on intra-EU B2B sales with a valid VIES-validated number (reverse charge), 22% on B2C and EE→EE B2B.
  • Cache validations 30 days, re-validate on address change.
Was this helpful?