Chat on WhatsApp

How do I validate AFM (Αριθμός Φορολογικού Μητρώου) + VIES for EU B2B?

Two Greek B2B identifiers, two validators:

  • AFM (Αριθμός Φορολογικού Μητρώου), 9-digit Greek tax-ID. Algorithmic checksum (last digit is mod-11 of weighted sum). Validated against the AADE business directory via the AADE web service.
  • VIES VAT, EU-wide validator (EL + 9-digit AFM for Greek-issued numbers). Required for cross-border zero-rated B2B sales (intra-EU reverse charge).

For Magento B2B we:

  1. Add AFM field to customer entity (and B2B company on Adobe Commerce).
  2. Run the AFM checksum client-side on register; reject invalid format before round-trip.
  3. Call AADE web service to verify the AFM is active and fetch the registered name + DOY (tax office). Cache 30 days.
  4. Call VIES for cross-border B2B; apply 0% ΦΠΑ with reverse charge note on the invoice when VIES is valid.
  5. Show the legal name on storefront once AFM is confirmed, reduces fraud + builds trust.

Required on every invoice over €100, we make the AFM block at checkout in the FR Greek view.

Was this helpful?