How do I validate Adószám (Hungarian tax-ID) + VIES for EU B2B in Magento?
Categories:
Magento Developer Hungary
Two Hungarian B2B identifiers, two validators:
- Adószám — the 11-digit Hungarian tax-ID, format
12345678-1-23where the first 8 digits are the unique taxpayer ID, the middle digit is the ÁFA status (1–5), and the last 2 digits are the regional code. Validated against NAV’s public taxpayer register (free SOAP / REST API). - EU VAT (HU prefix) — Hungarian EU VAT format
HU + 8-digit core. Validated via the VIES VAT service (EU-wide) for cross-border B2B.
For Magento B2B we:
- Add Adószám + EU VAT fields to the
customerentity (or B2Bcompanyon Adobe Commerce). - Validate Adószám against NAV’s register on registration — rejects invalid / suspended / closed entities, auto-fills company name + ÁFA status.
- Validate EU VAT against VIES for cross-border zero-rated B2B sales (intra-EU reverse charge).
- Apply 0% ÁFA on B2B intra-EU sales with a valid VIES-validated EU VAT number; 27% on HU-domestic B2C and HU→HU B2B without VIES; 5%/18% for reduced-rate categories.
- Cache validations 30 days, re-validate on any address change.
Was this helpful?