How does SDI / FatturaPA integration work in Magento 2?
The Sistema di Interscambio (SDI) is the Agenzia delle Entrate’s mandatory e-invoice routing platform. Every Italian B2B + B2C invoice since 2019 must be issued as FatturaPA XML (specific schema, signed with a digital certificate, routed through SDI to the recipient).
Magento integration flow:
- On
order_save_after(or invoice creation), serialize the order into FatturaPA XML 1.2.2 schema, header, body, line items, IVA breakdown by rate, Codice Fiscale / P.IVA / Codice Destinatario (or PEC). - Sign the XML with the merchant’s qualified digital certificate (CAdES-BES format).
- Submit to SDI via a PDP (Provider Digitale Partner), Aruba Fatturazione, FattureInCloud, TeamSystem, Pennylane, or directly via SDI’s SOAP web service if you’re a registered intermediary.
- Persist the SdI identificativo + status (consegnata / scartata / decorrenza termini) against
sales_order. - Handle rejections (scarto) gracefully, surface in admin grid, auto-retry on fixable schema errors.
- Retain XML + receipts for 10 years (AdE retention rule) in conservazione sostitutiva.
We wire the full pipeline + give your accountant a dashboard view.