🇮🇹 Generate and issue electronic invoices through Italy’s SDI system
Electronic invoicing is mandatory for all businesses in Italy. The Sistema di Interscambio (SDI) serves as the Italian government’s central hub for transmitting, validating, and delivering all electronic invoices throughout the country.
The SDI system operates using a standardized XML format called FatturaPA, which ensures all invoices contain the required information and comply with the strict validation rules established by the Italian tax authority (Agenzia delle Entrate). To ensure proper routing of invoices to the correct recipient, the SDI system uses a unique identifier called a Recipient Code, which is assigned to each registered SDI provider.
Invopop simplifies SDI integration by allowing you to work with GOBL format instead of XML, providing synchronous validation before submission, and offering a simple API integration with automatic handling of SDI notifications and status updates. For receiving invoices through SDI, see our companion guide: Italy - SDI: Receiving Invoices.
Connect the SDI Italy app
The initial connection requires no configuration for sending invoices.
Configure sending workflow
SDI does not have a sandbox environment. When sandbox
mode is selected, Invopop’s third-party submission service, A-Cube, simulates a response from SDI.
Copy and paste into a new Empty Invoice workflow code view.
Before starting, review the workflows guide to understand the general setup process.
In Console, create a new workflow and choose Empty Invoice workflow as the base. Then add the following steps:
sandbox
is chosen as the environment, the simulated response from SDI must be set.In the Error Handling section, add a Set State step with the state set to "Error"
to capture and flag failed imports.
This is the minimal workflow with state handling required to automate the reception and visualization of invoices received through SDI. You may expand it with additional steps such as storing a backup copy, notifying clients, or integrating the documents into an ERP system.
Invopop uses the GOBL FatturaPA library to process conversions. When creating invoices for SDI, you need to:
regime
field to IT
in your GOBL invoiceit-sdi-v1
addon to enable Italian-specific validations and extensionsDetailed information about the SDI-specific extensions and validations can be found in:
Example invoices are provided below, or you can use the GOBL Builder to create custom invoices.
This step generates the FatturaPA XML and sends it to SDI through our integration partner. Upon successful completion, the XML file is attached to the invoice entry. The SDI service usually responds within seconds but may take up to 24 hours. While waiting, this step remains in a Queued
state.
When the Send step completes, it returns one of three results:
OK
if successfulKO
for unrecoverable errorsSKIP
if the invoice was already sentB2C Standard Invoice
B2B Invoice
B2B Invoice with Additional Fields
Credit Note
Is electronic invoicing mandatory in Italy?
Yes, electronic invoicing through SDI is mandatory in Italy for B2G, B2B, and B2C transactions.
All invoices must be issued in FatturaPA format and transmitted through the SDI (Sistema di Interscambio) platform.
How can I correct an invoice?
There are two main ways to correct an invoice in the Italian SDI system:
The corrective document must reference the original invoice number and date.
Why is my invoice processing taking so long?
The SDI system can take up to 24 hours to process invoices, especially during peak periods. While waiting, the “Send to SDI” step will remain in the QUEUED
state. The system will automatically check for updates, and the status will change once SDI has processed the invoice.
How do I know if my invoice was delivered successfully?
Once the SDI process is complete, the workflow will show one of several status codes:
delivered
- The invoice was successfully delivered to a B2B recipientaccepted-pa
- The invoice was accepted by a Public Administrationnot-delivered
- The invoice couldn’t be delivered, but was processed correctly by SDICheck the workflow history to see the exact status.
Can I use the same workflow for both sending and receiving invoices?
No, sending and receiving invoices require different workflows:
For more information on receiving invoices, see our Italy - SDI: Receiving Invoices guide.
How do I add codice fiscale and Partita IVA
Invopop handles both Italian tax identification numbers in the supplier and customer sections of invoices:
tax_id/code
field.it-fiscal-code
.Here’s an example showing both identifiers in a supplier object:
For more information on receiving invoices, see our Italy - SDI: Receiving Invoices guide.
SDI Response Codes and Statuses
When the SDI step processes a document, it returns detailed status codes that provide information about the response from SDI:
Code | Description |
---|---|
rejected | Notifica di scarto (NS) SDI has rejected the invoice because it contains errors. |
delivered | Ricevuta consegna (RC) SDI has successfully delivered a B2B invoice to the recipient. |
delivered-pa | Ricevuta consegna (RC) SDI has successfully delivered an invoice to a Public Administration (PA). |
not-delivered | Mancata consegna (MC) SDI could not deliver the invoice to the recipient. |
not-delivered | Attestazione trasmissione con impossibilità di recapito (AT) SDI couldn’t deliver an invoice to PA after 10 days. |
accepted-pa | Notifica esito (NE) A PA has decided to accept an invoice (outcome EC01). |
rejected-pa | Notifica esito (NE) A PA has decided to reject an invoice (outcome EC02). |
deadline-terms | Notifica decorrenza termini (DT) A PA didn’t reply with acceptance or rejection within 15 days. |
invoice-error | An error occurred during the acquisition of a notification. |
sent | The invoice has been submitted to SDI and is awaiting a response. |
not-received | The invoice was not received by the recipient. |
Some SDI notifications (File metadati - MT, Esito committente - EC, Scarto esito committente - SE) don’t directly change the code of the invoice.
These codes map to different step results as follows:
delivered
, not-delivered
, not-received
, accepted-pa
rejected
, rejected-pa
, invoice-error
, deadline-terms
sent
, delivered-pa
When a step returns QUEUED
, the workflow will check again later for updates from SDI.