Italy โ Sistema di Interscambio (SDI)
TL;DR
- E-invoicing has been mandatory in Italy since 2019 for B2B and B2G; B2C since 2022.
- Every invoice must transit Agenzia delle Entrate's SDI hub; you can't bypass it.
- Native format is FatturaPA XML. Flowie auto-converts UBL โ FatturaPA and routes via SDI for you.
- Each invoice must be addressed via a Codice Destinatario (7 chars) or, for unregistered recipients, via certified email (PEC).
- SDI delivers three receipts per invoice: RC (delivered), NS (rejected), or MC (recipient unreachable). Flowie surfaces these as webhook events.
Background โ the SDI flow
Italy was the first country in the world to mandate B2B e-invoicing through a centralized hub. The flow:
Sender ERP โ Intermediary (Flowie) โ SDI โ Recipient
โ
Receipts (RC/NS/MC) โ back through Flowie
Flowie acts as your registered intermediario. We submit invoices on your behalf, store them for the legally-mandated 10 years, and forward SDI receipts to your webhook.
Codice Destinatario
Every Italian recipient has a Codice Destinatario (CD) โ a 7-character routing code that tells SDI where to deliver. Three flavors:
| Recipient type | Code format | Source |
|---|---|---|
| Has its own SDI channel | 7 alphanumeric chars (e.g. M5UXCR1) | Provided by recipient. |
| Public administration | 6-digit code (e.g. UFY9MC) | Indice PA โ indicepa.gov.it. |
| Has only PEC | 0000000 + recipientPec field | SDI uses the certified-email fallback. |
| Unknown / private individual | 0000000 | SDI delivers via Agenzia portal. |
To resolve a CD from a SIRET-equivalent (Italian Codice Fiscale), use:
curl โฆ/v1/companies/resolve?countryCode=IT&vatNumber=IT01234567890 \
-H "Authorization: Bearer $KEY"
# โ response.additionalIdentifiers includes "codiceDestinatario"
FatturaPA & UBL โ when to care
SDI accepts only FatturaPA XML 1.2.2. If you send Flowie UBL or JSON, we transcode to FatturaPA before submission to SDI. The reverse is true for incoming: we transcode FatturaPA โ UBL so your stack only ever deals with one format.
If you must send raw FatturaPA (e.g. you already generate it from your ERP):
curl -X POST โฆ/v1/documents/send \
-H "Authorization: Bearer $KEY" \
-d '{
"type":"invoice",
"format":"ubl-xml",
"from":"comp_โฆ",
"to":"0211:01234567890",
"xml":"<?xml version=\"1.0\"?><p:FatturaElettronica โฆ>โฆ</p:FatturaElettronica>"
}'
Required fields for Italian invoices
-
seller.additionalIdentifiers[codiceFiscale]required
11- or 16-character Italian tax code. Auto-populated on company creation from the registry.
-
buyer.additionalIdentifiers[codiceDestinatario]required
7-char CD or
0000000+buyer.contact.pec. -
document.note (TipoDocumento)required
SDI document type:
TD01standard invoice,TD04credit note,TD16reverse-charge,TD17intra-EU services,TD24deferred invoice, โฆ -
document.lines[].vatCategoryrequired
Italy uses Natura codes (
N1โN7) on top of standard rates. Required whenvatRate = 0. -
payment.discountTermsoptional but enforced
If present,
endDatemust precededocument.dueDate. SDI rejects otherwise (00400).
Lifecycle & SDI receipts
SDI returns one of four asynchronous receipts. Each maps to a Flowie event:
| SDI receipt | Meaning | Flowie event |
|---|---|---|
RC (Ricevuta di Consegna) | Delivered to recipient. | document.delivered |
NS (Notifica di Scarto) | Rejected by SDI for schema/format reasons. | document.failed |
MC (Mancata Consegna) | Recipient unreachable โ SDI made it available on the Agenzia portal. | document.delivered with deliveryStatus="delivered_via_portal" |
MT (Metadata) | Per-invoice metadata file SDI sends to the buyer alongside the FatturaPA payload โ invoice number, date, sender, amounts. Surfaced as a payload extension on document.delivered. | document.delivered (with metadata.sdiMetadata populated) |
EC (Esito Committente) | Buyer accepted or rejected at business level (B2G only โ 15-day window). | lifecycle.updated |
SE (Notifica Scarto Invio) | Sender-side schema rejection โ invoice never reached the buyer because it failed SDI's structural validation. Distinct from NS: fired earlier, before any delivery attempt. | document.failed with errorCode in the EC class |
The 6-receipt model above is the canonical SDI flow. Some senders only ever see RC + NS in practice; MT, EC, SE only appear on specific configurations (B2G, schema failures, high-volume integrations).
SDI error codes (selected)
| Code | Meaning | Fix |
|---|---|---|
00200 | Schema validation error. | Inspect error.details[]. |
00306 | Codice Destinatario unknown. | Use Indice PA for public buyers; otherwise ask your customer. |
00311 | Codice Destinatario format invalid. | Must be exactly 6 (PA) or 7 (private) alphanumeric chars. |
00400 | Payment discount end-date after due date. | Reorder dates. |
00404 | Document already exists (same number + sender + year). | SDI dedupe โ increment your numbering. |
00417 | VAT calculation mismatch. | Recheck line quantity * unitPrice * vatRate rounding. |
00471 | Foreign sender โ must use TD17/TD18/TD19. | Set the right TipoDocumento. |
Testing your Italian integration
| What you want to test | How |
|---|---|
| SDI happy path | Sender VAT IT00000000010, recipient 0211:00000000099 with CD FLOWIE0. |
| Codice Destinatario rejection | simulateCompliance: "reject_00306". |
| VAT mismatch | Send a line with quantity: 0.333 and force-round โ triggers 00417. |
| MC fallback (portal delivery) | Recipient CD 0000000 with no PEC โ arrives as document.delivered_via_portal. |
FAQ
Do I need a separate authorization in Italy?
No. Flowie's intermediario credentials cover all our customers. You just need to grant us the SDI delegation in your Fisconline account once โ the dashboard walks you through it.
What about the 10-year storage requirement?
Italian law requires every B2B invoice to be archived for 10 years in a "conservazione sostitutiva" environment. Flowie's archive complies with the Agenzia delle Entrate technical specs (DPCM 03/12/2013). No extra cost.
Can I send a paper invoice in parallel?
Legally, no โ only the SDI-transmitted version counts. You can send a courtesy PDF copy via email, but it has no fiscal value.
References
Primary sources (Italian government & EU regulator):
- Agenzia delle Entrate ยท Fatturazione elettronica โ Official taxpayer portal; technical specs, FAQ, ramp dates.
- FatturaPA ยท official portal โ FatturaPA reference site (formats, schema, examples).
- Specifiche tecniche fatturazione B2B v1.9 โ Authoritative XML schema and validation rules (PDF).
- IndicePA โ Public-administration directory for B2G Codice Univoco lookup.
- Fisconline / Servizi IVA โ Where you delegate Flowie as intermediario for SDI submission.
- Decreto Legge n. 66/2014 (Normattiva) โ Foundational law mandating B2G e-invoicing.
- Legge di Bilancio 2018 ยท Art. 1 cc. 909-928 โ Extension to universal B2B clearance from 2019.
- EU Commission ยท eInvoicing in Italy โ Pan-EU reference factsheet.
- OpenPeppol ยท Italy profile โ Peppol BIS interaction with SDI.
Industry analyses (cross-reference for the SDI mechanics):
- Sovos ยท Italy SDI mandate guide โ Industry tracker โ clearance model details.
- Pagero ยท Italy compliance updates โ Industry compliance tracker.
