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:
- Configure ANAF API credentials in admin (OAuth 2.0 client ID + cert).
- On
invoice_save_after, generate UBL 2.1 RO_CIUS-compliant XML using the customer CUI + line items + TVA breakdown. - POST the XML to ANAF SPV via the upload endpoint, ANAF returns a unique ID + status.
- Poll status (or use webhook): received → processed → validated (or rejected with error code).
- Store the validated XML against
sales_invoice+ attach to the order PDF (Factur-X equivalent, PDF/A-3 with embedded XML). - 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.