Flowie
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

Document types — TipoDocumento (TD)

Every Italian e-invoice carries a TipoDocumento (TD) code that tells SDI what kind of document it is — ordinary sale, credit note, self-invoice, integration for reverse charge, and so on. Set it via document.note (we map it into the FatturaPA <TipoDocumento> field). Picking the wrong TD is a common cause of business-side errors and of scarto codes 0047100474.

Deep dive & interactive explorer: the full referential — every code filterable by family, click-to-detail with the rules and the exact Flowie call, plus a deep dive on each family — is on the dedicated Document types explorer. The table below is the summary.

The complete current set (Agenzia delle Entrate guide v1.10, April 2025). Numbering jumps from TD09 to TD16 by design — TD10TD15 do not exist.

TDDescrizione (IT)What it's for
TD01FatturaOrdinary invoice — standard B2B / B2C / B2G sale of goods or services.
TD02Acconto/anticipo su fatturaAdvance / down payment against an invoice.
TD03Acconto/anticipo su parcellaAdvance / down payment against a professional fee.
TD04Nota di creditoCredit note.
TD05Nota di debitoDebit note.
TD06ParcellaProfessional fee invoice (lawyers, consultants, …).
TD07Fattura semplificataSimplified invoice (total ≤ €400).
TD08Nota di credito semplificataSimplified credit note.
TD09Nota di debito semplificataSimplified debit note.
TD16Integrazione fattura da reverse charge internoSelf-integration of a domestic reverse-charge invoice.
TD17Integrazione/autofattura per acquisto servizi dall'esteroIntegration / self-invoice for services bought from abroad.
TD18Integrazione per acquisto di beni intracomunitariIntegration for intra-EU purchases of goods.
TD19Integrazione/autofattura per acquisto di beni ex art. 17 c.2 DPR 633/72Integration / self-invoice for goods bought from a non-resident but already in Italy.
TD20Autofattura per regolarizzazione e integrazione delle fattureSelf-invoice to regularise a missing / irregular supplier invoice.
TD21Autofattura per splafonamentoSelf-invoice for exceeding the export-VAT ceiling (plafond).
TD22Estrazione beni da Deposito IVAWithdrawal of goods from a VAT warehouse.
TD23Estrazione beni da Deposito IVA con versamento dell'IVAWithdrawal from a VAT warehouse, with VAT payment.
TD24Fattura differita — art. 21 c.4 lett. a) DPR 633/72Deferred invoice (goods delivered via DDT / services documented).
TD25Fattura differita — art. 21 c.4 lett. b) DPR 633/72Deferred invoice for triangulation resale by the intermediary.
TD26Cessione di beni ammortizzabili e passaggi interniSale of depreciable assets / internal transfers between activities.
TD27Fattura per autoconsumo o per cessioni gratuite senza rivalsaOwn-consumption or free-of-charge transfer without VAT recovery.
TD28Acquisti da San Marino con IVA (fattura cartacea)Purchases from San Marino with VAT (paper invoice received).
TD29Comunicazione per omessa o irregolare fatturazione (art. 6 c.8 D.Lgs. 471/97)Buyer's notice to the tax authority of a supplier's omitted / irregular domestic invoicing (added v1.10; took over this case from TD20).

Self-invoice TDs need seller = buyer. For TD16TD27 (integrations / self-invoices) SDI checks the cedente/prestatore against the cessionario/committente: TD20/TD21/TD27 must have seller = buyer (00472), the foreign-purchase TDs require a non-IT seller country (00473), and ordinary TD01 must have seller ≠ buyer (00471).

Lifecycle & SDI receipts

SDI returns a sequence of asynchronous XML messages. The full set (official fatturapa.gov.it definitions), and how each maps to a Flowie event:

MsgNome (IT)When it firesFlowie event
NSNotifica di scartoFile failed SDI checks (see codes) — not fiscally issued. Correct & resend within 5 days, same number/date.document.failed
MTFile dei metadatiSent to the recipient alongside the FatturaPA file — routing/metadata (number, date, sender, amounts).document.delivered (metadata.sdiMetadata set)
RCRicevuta di consegnaPassed checks and delivered to the recipient (via CD or PEC). Carries the delivery date.document.delivered
MCMancata consegnaValid but SDI can't currently deliver (channel unreachable, mailbox full). Made available on the recipient's Fatture e Corrispettivi portal; SDI keeps retrying.document.delivered, deliveryStatus="delivered_via_portal"
ATAttestazione di avvenuta trasmissione (con impossibilità di recapito)Valid but undeliverable at all (typically B2G channel persistently down). SDI issues a transmission certificate so the sender can deliver by other means.document.delivered, deliveryStatus="transmitted_undeliverable"
ECEsito committente — EC01 accettazione / EC02 rifiutoB2G only. The PA recipient's decision sent to SDI within 15 days: accept (EC01) or reject (EC02).lifecycle.updated
NENotifica di esitoB2G only. SDI relays the recipient's EC01/EC02 outcome back to the sender.lifecycle.updated
SEScarto esito committenteSDI rejected the recipient's EC message itself (inadmissible / non-conformant).
DTNotifica di decorrenza terminiB2G only. 15 days passed after delivery with no EC outcome → terms expired, SDI closes the flow (invoice considered processed).lifecycle.updated

Flow: send → checks fail ⇒ NS (stop, fix & resend) · checks pass ⇒ delivery: success ⇒ RC (+ MT to recipient) · temporary failure ⇒ MC · permanent failure ⇒ AT. B2G only, after delivery the PA may return EC01/EC02 (relayed to the sender as NE); no answer in 15 days ⇒ DT. Private B2B/B2C have no accept/reject step — the recipient cannot formally refuse via SDI, so RC / MC is the terminal state.

SDI scarto codes — reasons for a Notifica di scarto (NS)

When SDI rejects (scarta) a FatturaPA file it returns a NS carrying one or more of these codes. The file is not fiscally issued — correct and resend within 5 days keeping the same number and date. Authoritative list: fatturapa.gov.it Elenco controlli v1.7. The codes below are the complete set, grouped by what they check.

Nomenclature, transmission & uniqueness (00001–00102, 00404)

CodeMeaningFix
00001Nome file non valido — wrong filename format.IT<idtrasmittente>_<progressivo>.xml(.p7m), progressivo base-36.
00002Nome file duplicato — a file with this name was already sent.Increment the progressivo in the filename.
00003File-size limit exceeded.Max 5 MB (web) / 150 MB (SDICoop, SFTP). Split or compress attachments.
00102Signed file (.p7m) but the CAdES/XAdES signature is absent or malformed.Re-sign with a valid qualified certificate (B2G requires a signature).
00404Fattura duplicata — same sender VAT + year + number already accepted.SDI dedupe; increment your numbering. (Distinct from 00002, which is the filename.)
00409 / 00411The file is a duplicate of one already in processing / already processed within the batch.Remove the duplicate from the lotto.

Schema & signature integrity (00400-class structural)

CodeMeaningFix
00200File non conforme al formato — schema (XSD) validation failed.Inspect error.details[]; validate against the FatturaPA 1.2.x / 1.9 XSD before sending.
00201More than the allowed number of schema errors (≥ 50 reported, processing aborted).Fix the structural defects; re-validate.

Sender / recipient identity & routing (00300–00330)

CodeMeaningFix
00300IdFiscaleIVA of the trasmittente not valid.Check the transmitter's VAT id format/country.
00301IdFiscaleIVA of cedente/prestatore (seller) not valid.Correct the seller VAT number.
00302CodiceFiscale of cedente/prestatore not valid.Correct the seller codice fiscale.
00303IdFiscaleIVA of cessionario/committente (buyer) not valid.Correct the buyer VAT number.
00305CodiceFiscale of cessionario/committente not valid.Correct the buyer codice fiscale.
00306CodiceDestinatario not present in the Indice PA (for a PA recipient).Look up the office on indicepa.gov.it; for private buyers use their 7-char SDI code or 0000000+PEC.
00309For a PA, CodiceDestinatario = 0000000 (the catch-all) is not allowed.PA recipients need their real 6-char office code.
00311CodiceDestinatario format invalid.Exactly 6 chars (PA) or 7 chars (private).
00312For a private recipient the 7-char CodiceDestinatario is not a registered SDI channel.Use a valid registered code, or 0000000 with a valid PECDestinatario.
00313CodiceDestinatario = 0000000 but no PECDestinatario supplied.Provide the recipient's PEC mailbox.
00320For a PA recipient, PECDestinatario must not be filled.Remove the PEC; PA route is by office code only.
00330IdFiscaleIVA of trasmittente equals cessionario/committente — not allowed for that flow.Check who is transmitting vs receiving.

Amounts, VAT & rounding (00400–00430)

CodeMeaningFix
00400Natura present but an AliquotaIVA > 0 is also set (or vice-versa).A zero-rate/exempt line needs a Natura code and rate 0; a taxed line needs a rate > 0 and no Natura.
00401Natura missing where AliquotaIVA = 0.Supply the right N1N7 exemption code.
00403DataScadenzaPagamento earlier than invoice date.Due date must be on/after the document date.
00411RiferimentoNumeroLinea in a discount/surcharge points to a non-existent line.Fix the line reference.
00413Natura = N6 (reverse charge) but EsigibilitaIVA set to split-payment (S).N6 and split payment are mutually exclusive.
00414Natura = N6.x required when EsigibilitaIVA indicates reverse charge.Use a specific N6.* sub-code (post-2021 granularity).
00415Only a generic N2/N3/N6 used — the granular sub-codes are mandatory.Use N2.1/N2.2, N3.1…N3.6, N6.1…N6.9.
00417Neither IdFiscaleIVA nor CodiceFiscale present for the buyer.At least one buyer tax identifier is required.
00418Data of the invoice in DatiGeneraliDocumento is after the receipt date at SDI.No future-dated invoices.
00419A VAT-summary row (DatiRiepilogo) is missing for an AliquotaIVA/Natura used on the lines.Add the matching summary block per rate/nature.
00420ImponibileImporto in a summary row inconsistent with the lines of that rate.Recompute the taxable base per rate.
00421Imposta in a summary row ≠ ImponibileImporto × AliquotaIVA (beyond 1-cent tolerance).Recheck VAT rounding per summary row.
00422ImponibileImporto inconsistent with PrezzoTotale of the related lines.Reconcile line totals to the summary base.
00423PrezzoTotalePrezzoUnitario × (Quantità) ± sconti.Recompute the line total.
00424Imposta of a summary row doesn't match the declared rounding.Align to standard rounding (2 decimals).
00425Numero of the document missing a numeric character.The invoice number must contain at least one digit.
00427EsigibilitaIVA = S (split payment) but the buyer is not a PA / eligible entity.Split payment only for qualifying public/listed buyers.
00430TipoDocumento = TD01 but seller = buyer.An ordinary invoice can't be self-addressed (use a self-invoice TD).

TipoDocumento ↔ parties consistency (00471–00474)

CodeMeaningFix
00471TipoDocumento is TD01/TD02/TD03/TD06 but cedente = cessionario (seller = buyer).These ordinary types require seller ≠ buyer.
00472TipoDocumento = TD16/TD17/TD18/TD19/TD20/TD22/TD23/TD28 but seller = buyer where the type forbids it (or vice-versa).Self-invoice / integration types: set the cedente and cessionario per the type's rule (e.g. TD20/21/27 need seller = buyer).
00473TipoDocumento = TD17/TD18/TD19 (foreign purchase) but the seller country is IT.The cedente/prestatore on a foreign-purchase self-invoice must be a non-Italian country.
00474TipoDocumento = TD28 (San Marino) but the seller country is not SM.Use TD28 only for purchases from San Marino.

Where the code lands in the API. A scarto surfaces on the document.failed webhook and on GET /v1/documents/{id} as error.code (the 00xxx value) plus a human-readable error.message and, for schema errors (00200), an error.details[] array naming the offending XML element/xpath.

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):