FlowieExchange
Compliance ยท ๐Ÿ‡ฎ๐Ÿ‡น Italy

Italy โ€” Sistema di Interscambio (SDI)

TL;DR

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 typeCode formatSource
Has its own SDI channel7 alphanumeric chars (e.g. M5UXCR1)Provided by recipient.
Public administration6-digit code (e.g. UFY9MC)Indice PA โ€” indicepa.gov.it.
Has only PEC0000000 + recipientPec fieldSDI uses the certified-email fallback.
Unknown / private individual0000000SDI 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

Lifecycle & SDI receipts

SDI returns one of four asynchronous receipts. Each maps to a Flowie event:

SDI receiptMeaningFlowie 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)

CodeMeaningFix
00200Schema validation error.Inspect error.details[].
00306Codice Destinatario unknown.Use Indice PA for public buyers; otherwise ask your customer.
00311Codice Destinatario format invalid.Must be exactly 6 (PA) or 7 (private) alphanumeric chars.
00400Payment discount end-date after due date.Reorder dates.
00404Document already exists (same number + sender + year).SDI dedupe โ€” increment your numbering.
00417VAT calculation mismatch.Recheck line quantity * unitPrice * vatRate rounding.
00471Foreign sender โ€” must use TD17/TD18/TD19.Set the right TipoDocumento.

Testing your Italian integration

What you want to testHow
SDI happy pathSender VAT IT00000000010, recipient 0211:00000000099 with CD FLOWIE0.
Codice Destinatario rejectionsimulateCompliance: "reject_00306".
VAT mismatchSend 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):

Industry analyses (cross-reference for the SDI mechanics):