Chat on WhatsApp

What’s the e-Factura mandate and how do I integrate Magento with ANAF SPV?

e-Factura is Romania’s mandatory e-invoicing system, run by ANAF (Agenția Națională de Administrare Fiscală). The platform is SPV (Spațiul Privat Virtual), specifically the e-Factura RO module that accepts UBL 2.1 RO_CIUS XML invoices.

Timeline:

  • 1 July 2024, mandatory for all B2B transactions (including B2G which was already required).
  • 1 January 2025, extended to B2C transactions > RON 100. Most cross-segment B2C ecommerce sales already in scope.
  • Penalties for non-compliance start at RON 5,000 for small companies and RON 10,000 for large ones, plus the invoice is treated as legally invalid.

Magento integration steps:

  1. Configure ANAF API credentials in admin (OAuth 2.0 client ID + cert).
  2. On invoice_save_after, generate UBL 2.1 RO_CIUS-compliant XML using the customer CUI + line items + TVA breakdown.
  3. POST the XML to ANAF SPV via the upload endpoint, ANAF returns a unique ID + status.
  4. Poll status (or use webhook): receivedprocessedvalidated (or rejected with error code).
  5. Store the validated XML against sales_invoice + attach to the order PDF (Factur-X equivalent, PDF/A-3 with embedded XML).
  6. For rejection, surface error code in admin + email merchant.

We integrate this on every RO Build tier, tested against the ANAF sandbox before going live.

Was this helpful?