---
title: "Italy · SDI compliance"
description: "Sending invoices in Italy via Sistema di Interscambio (SDI): Codice Destinatario, FatturaPA, exchange formats, deadlines, error codes."
canonical: "https://docs.get-flowie.com/compliance/it/"
source: "https://docs.get-flowie.com/compliance/it/index.html"
---

# Italy · SDI compliance

Compliance · 🇮🇹 Italy

# 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:
[code] 
    Sender ERP → Intermediary (Flowie) → SDI → Recipient
                                           ↓
                                     Receipts (RC/NS/MC) ← back through Flowie
[/code]

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](<https://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:
[code] 
    curl …/v1/companies/resolve?countryCode=IT&vatNumber=IT01234567890 \
      -H "Authorization: Bearer $KEY"
    # → response.additionalIdentifiers includes "codiceDestinatario"
[/code]

## 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):
[code] 
    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>"
      }'
[/code]

## 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: `TD01` standard invoice, `TD04` credit note, `TD16` reverse-charge, `TD17` intra-EU services, `TD24` deferred invoice, …

  * document.lines[].vatCategoryrequired

Italy uses Natura codes (`N1`–`N7`) on top of standard rates. Required when `vatRate = 0`.

  * payment.discountTermsoptional but enforced

If present, `endDate` must precede `document.dueDate`. SDI rejects otherwise (`00400`).




## 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 `00471`–`00474`](<#error-codes>).

**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**](<document-types.html>). 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 — `TD10`–`TD15` do not exist.

TD| Descrizione (IT)| What it's for  
---|---|---  
`TD01`| Fattura| Ordinary invoice — standard B2B / B2C / B2G sale of goods or services.  
`TD02`| Acconto/anticipo su fattura| Advance / down payment against an invoice.  
`TD03`| Acconto/anticipo su parcella| Advance / down payment against a professional fee.  
`TD04`| Nota di credito| Credit note.  
`TD05`| Nota di debito| Debit note.  
`TD06`| Parcella| Professional fee invoice (lawyers, consultants, …).  
`TD07`| Fattura semplificata| Simplified invoice (total ≤ €400).  
`TD08`| Nota di credito semplificata| Simplified credit note.  
`TD09`| Nota di debito semplificata| Simplified debit note.  
`TD16`| Integrazione fattura da reverse charge interno| Self-integration of a **domestic** reverse-charge invoice.  
`TD17`| Integrazione/autofattura per acquisto servizi dall'estero| Integration / self-invoice for **services bought from abroad**.  
`TD18`| Integrazione per acquisto di beni intracomunitari| Integration for **intra-EU purchases of goods**.  
`TD19`| Integrazione/autofattura per acquisto di beni ex art. 17 c.2 DPR 633/72| Integration / self-invoice for goods bought from a non-resident but already in Italy.  
`TD20`| Autofattura per regolarizzazione e integrazione delle fatture| Self-invoice to regularise a missing / irregular supplier invoice.  
`TD21`| Autofattura per splafonamento| Self-invoice for exceeding the export-VAT ceiling (plafond).  
`TD22`| Estrazione beni da Deposito IVA| Withdrawal of goods from a VAT warehouse.  
`TD23`| Estrazione beni da Deposito IVA con versamento dell'IVA| Withdrawal from a VAT warehouse, with VAT payment.  
`TD24`| Fattura differita — art. 21 c.4 lett. a) DPR 633/72| Deferred invoice (goods delivered via DDT / services documented).  
`TD25`| Fattura differita — art. 21 c.4 lett. b) DPR 633/72| Deferred invoice for triangulation resale by the intermediary.  
`TD26`| Cessione di beni ammortizzabili e passaggi interni| Sale of depreciable assets / internal transfers between activities.  
`TD27`| Fattura per autoconsumo o per cessioni gratuite senza rivalsa| Own-consumption or free-of-charge transfer without VAT recovery.  
`TD28`| Acquisti da San Marino con IVA (fattura cartacea)| Purchases from San Marino with VAT (paper invoice received).  
`TD29`| Comunicazione 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 `TD16`–`TD27` (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:

Msg| Nome (IT)| When it fires| Flowie event  
---|---|---|---  
`NS`| Notifica di scarto| File failed SDI checks (see [codes](<#error-codes>)) — **not** fiscally issued. Correct & resend within 5 days, same number/date.| `document.failed`  
`MT`| File dei metadati| Sent to the _recipient_ alongside the FatturaPA file — routing/metadata (number, date, sender, amounts).| `document.delivered` (`metadata.sdiMetadata` set)  
`RC`| Ricevuta di consegna| Passed checks **and** delivered to the recipient (via CD or PEC). Carries the delivery date.| `document.delivered`  
`MC`| Mancata consegna| Valid 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"`  
`AT`| Attestazione 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"`  
`EC`| Esito committente — `EC01` accettazione / `EC02` rifiuto| **B2G only.** The PA recipient's decision sent _to_ SDI within 15 days: accept (`EC01`) or reject (`EC02`).| `lifecycle.updated`  
`NE`| Notifica di esito| **B2G only.** SDI relays the recipient's `EC01`/`EC02` outcome back to the _sender_.| `lifecycle.updated`  
`SE`| Scarto esito committente| SDI rejected the recipient's `EC` message itself (inadmissible / non-conformant).| —  
`DT`| Notifica di decorrenza termini| **B2G 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)

Code| Meaning| Fix  
---|---|---  
`00001`| Nome file non valido — wrong filename format.| `IT<idtrasmittente>_<progressivo>.xml(.p7m)`, progressivo base-36.  
`00002`| Nome file duplicato — a file with this name was already sent.| Increment the progressivo in the filename.  
`00003`| File-size limit exceeded.| Max 5 MB (web) / 150 MB (SDICoop, SFTP). Split or compress attachments.  
`00102`| Signed file (`.p7m`) but the CAdES/XAdES signature is absent or malformed.| Re-sign with a valid qualified certificate (B2G requires a signature).  
`00404`| Fattura duplicata — same _sender VAT + year + number_ already accepted.| SDI dedupe; increment your numbering. (Distinct from `00002`, which is the filename.)  
`00409` / `00411`| The 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)

Code| Meaning| Fix  
---|---|---  
`00200`| File non conforme al formato — schema (XSD) validation failed.| Inspect `error.details[]`; validate against the FatturaPA 1.2.x / 1.9 XSD before sending.  
`00201`| More than the allowed number of schema errors (≥ 50 reported, processing aborted).| Fix the structural defects; re-validate.  
  
### Sender / recipient identity & routing (00300–00330)

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

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

Code| Meaning| Fix  
---|---|---  
`00471`| `TipoDocumento` is `TD01/TD02/TD03/TD06` but cedente = cessionario (seller = buyer).| These ordinary types require seller ≠ buyer.  
`00472`| `TipoDocumento = 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).  
`00473`| `TipoDocumento = 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.  
`00474`| `TipoDocumento = 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 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](<https://www.agenziaentrate.gov.it/portale/web/guest/aree-tematiche/fatturazione-elettronica>) — Official taxpayer portal; technical specs, FAQ, ramp dates.
  * [FatturaPA · official portal](<https://www.fatturapa.gov.it/it/index.html>) — FatturaPA reference site (formats, schema, examples).
  * [Specifiche tecniche fatturazione B2B v1.9](<https://www.fatturapa.gov.it/export/documenti/fatturazione-attiva/Specifiche_tecniche_fatturazione_b2b_v1.9.pdf>) — Authoritative XML schema and validation rules (PDF).
  * [IndicePA](<https://indicepa.gov.it>) — Public-administration directory for B2G Codice Univoco lookup.
  * [Fisconline / Servizi IVA](<https://ivaservizi.agenziaentrate.gov.it/>) — Where you delegate Flowie as _intermediario_ for SDI submission.
  * [Decreto Legge n. 66/2014 (Normattiva)](<https://www.normattiva.it/uri-res/N2Ls?urn:nir:stato:legge:2014;89>) — Foundational law mandating B2G e-invoicing.
  * [Legge di Bilancio 2018 · Art. 1 cc. 909-928](<https://www.normattiva.it/uri-res/N2Ls?urn:nir:stato:legge:2017-12-27;205>) — Extension to universal B2B clearance from 2019.
  * [EU Commission · eInvoicing in Italy](<https://ec.europa.eu/digital-building-blocks/sites/spaces/DIGITAL/pages/467108890/eInvoicing+in+Italy>) — Pan-EU reference factsheet.
  * [OpenPeppol · Italy profile](<https://peppol.org/learn-more/country-profiles/italy/>) — Peppol BIS interaction with SDI.



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

  * [Sovos · Italy SDI mandate guide](<https://sovos.com/regulatory-updates/vat/italy-electronic-invoicing-mandate/>) — Industry tracker — clearance model details.
  * [Pagero · Italy compliance updates](<https://www.pagero.com/compliance/regulatory-updates/italy>) — Industry compliance tracker.
