Generate Cross-Border SdI XML (TD17 / TD18 / TD19)
Skill: Convert estero (cross-border) transactions into the SdI integrazione/autofattura XML
Region: Italy (Italia) Category: E-Invoicing — operazioni con l'estero (ex esterometro) Does: Takes cross-border purchases/sales involving non-established counterparties and produces a FatturaPA XML with the special TipoDocumento TD17/TD18/TD19 (integrazione/autofattura) transmitted through the Sistema di Interscambio (SdI) — the obligation that replaced the esterometro for reporting foreign operations. Standard: FatturaPA tracciato 1.2.x — TipoDocumento per operazioni estere
Since 1 July 2022 cross-border operations are no longer reported via the separate esterometro; instead each foreign transaction is sent to SdI as an XML with a dedicated TipoDocumento. For purchases (the buyer self-bills) the file is addressed to oneself (
CodiceDestinatario=0000000, your own VAT as both cedente reference and cessionario). Deadlines: emission within 12 days for sales; integration of foreign purchases by the 15th of the month following receipt. Validate against the current SdI controlli.
When this applies
| TipoDocumento | Use | Mechanism |
|---|---|---|
| TD17 | Integrazione/autofattura for services received from a non-resident supplier | Reverse charge: buyer self-assesses Italian VAT |
| TD18 | Integrazione for intra-EU acquisition of goods (acquisto intracomunitario di beni) | Reverse charge on EU goods |
| TD19 | Integrazione/autofattura ex art.17 c.2 for goods already in Italy purchased from a non-resident (incl. ex art.41 DL 331) | Reverse charge / autofattura |
For sales/exports to foreign customers without an Italian SdI address, the ordinary TD01 invoice is emitted with CodiceDestinatario = XXXXXXX and the appropriate Natura (non imponibile/non soggetta) — that is the e-invoice route, separate from the TD17–19 integration route used for purchases.
Input data required
| Input | SdI element |
|---|---|
| TipoDocumento (TD17/18/19) | DatiGeneraliDocumento/TipoDocumento |
| Foreign counterparty identity & country | CedentePrestatore (foreign IdPaese + IdCodice) |
| Italian self-biller (you) | CessionarioCommittente (your Partita IVA) |
| Original document date/number reference | DatiGenerali / Data, Numero |
| Taxable base, Italian VAT rate or Natura | DatiRiepilogo (AliquotaIVA, Imponibile, Imposta, Natura) |
| Esigibilità | EsigibilitaIVA |
Structure and key handling
IdTrasmittenteandCessionarioCommittentecarry your Italian Partita IVA;CedentePrestatorecarries the foreign supplier (IdPaese= e.g.DE,FR, orOOfor non-EU with no VAT, plusIdCodice).CodiceDestinatario=0000000(the integration document is delivered back to you).- Reverse charge: you compute the Italian
Impostaeven though the foreign supplier charged none — the same VAT is then both output (debito) and input (credito/detrazione) in the VAT ledgers and LIPE. - Natura / esigibilità: when the operation is taxable under reverse charge you state the actual
AliquotaIVA(e.g. 22.00) andImposta; when non-taxable/exempt you setAliquotaIVA= 0.00 and the matching Natura (e.g.N3.4non imponibili esportazioni-assimilate,N6.xonly for domestic reverse charge — for estero you generally compute the tax).EsigibilitaIVA=I(immediata).
p:FatturaElettronica versione="FPR12"
├── FatturaElettronicaHeader
│ ├── DatiTrasmissione (IdTrasmittente = your PIVA, CodiceDestinatario 0000000)
│ ├── CedentePrestatore (FOREIGN supplier, IdPaese non-IT)
│ └── CessionarioCommittente (YOUR Italian PIVA)
└── FatturaElettronicaBody
└── DatiGenerali/DatiBeniServizi (TipoDocumento TD17/18/19, DettaglioLinee, DatiRiepilogo with Italian VAT)
Calculation rules
- Convert the foreign-currency taxable base to EUR at the proper rate; report
Imponibilein EUR. Imposta=Imponibile× ItalianAliquotaIVA(e.g. 22%) — self-assessed, not charged by the foreign supplier.- Reference the foreign document's own date/number in
DatiGeneraliDocumento; theDatashould fall within the integration deadline window.
Worked example (TD17 — service from an EU supplier, reverse charge @ 22%)
<?xml version="1.0" encoding="UTF-8"?>
<p:FatturaElettronica versione="FPR12"
xmlns:p="http://ivaservizi.agenziaentrate.gov.it/docs/xsd/fatture/v1.2">
<FatturaElettronicaHeader>
<DatiTrasmissione>
<IdTrasmittente><IdPaese>IT</IdPaese><IdCodice>01234567890</IdCodice></IdTrasmittente>
<ProgressivoInvio>00077</ProgressivoInvio>
<FormatoTrasmissione>FPR12</FormatoTrasmissione>
<CodiceDestinatario>0000000</CodiceDestinatario>
</DatiTrasmissione>
<CedentePrestatore>
<DatiAnagrafici>
<IdFiscaleIVA><IdPaese>DE</IdPaese><IdCodice>DE123456789</IdCodice></IdFiscaleIVA>
<Anagrafica><Denominazione>Lieferant GmbH</Denominazione></Anagrafica>
</DatiAnagrafici>
<Sede><Indirizzo>Hauptstrasse 5</Indirizzo><CAP>10115</CAP><Comune>Berlin</Comune><Nazione>DE</Nazione></Sede>
</CedentePrestatore>
<CessionarioCommittente>
<DatiAnagrafici>
<IdFiscaleIVA><IdPaese>IT</IdPaese><IdCodice>01234567890</IdCodice></IdFiscaleIVA>
<Anagrafica><Denominazione>Acme S.r.l.</Denominazione></Anagrafica>
</DatiAnagrafici>
<Sede><Indirizzo>Via Roma 1</Indirizzo><CAP>20121</CAP><Comune>Milano</Comune><Provincia>MI</Provincia><Nazione>IT</Nazione></Sede>
</CessionarioCommittente>
</FatturaElettronicaHeader>
<FatturaElettronicaBody>
<DatiGenerali>
<DatiGeneraliDocumento>
<TipoDocumento>TD17</TipoDocumento>
<Divisa>EUR</Divisa>
<Data>2026-05-31</Data>
<Numero>INT-2026-0077</Numero>
<ImportoTotaleDocumento>2440.00</ImportoTotaleDocumento>
</DatiGeneraliDocumento>
</DatiGenerali>
<DatiBeniServizi>
<DettaglioLinee>
<NumeroLinea>1</NumeroLinea>
<Descrizione>Servizio di consulenza IT - integrazione reverse charge</Descrizione>
<PrezzoUnitario>2000.00</PrezzoUnitario>
<PrezzoTotale>2000.00</PrezzoTotale>
<AliquotaIVA>22.00</AliquotaIVA>
</DettaglioLinee>
<DatiRiepilogo>
<AliquotaIVA>22.00</AliquotaIVA>
<Imponibile>2000.00</Imponibile>
<Imposta>440.00</Imposta>
<EsigibilitaIVA>I</EsigibilitaIVA>
</DatiRiepilogo>
</DatiBeniServizi>
</FatturaElettronicaBody>
</p:FatturaElettronica>
The 440.00 self-assessed VAT is registered as both IVA a debito and IVA a credito and flows into the periodic LIPE.
Validation checklist
- Correct TipoDocumento: TD17 services, TD18 intra-EU goods, TD19 goods already in Italy / art.17 c.2
-
CedentePrestatore= the foreign party with non-ITIdPaese;CessionarioCommittente= your Partita IVA -
CodiceDestinatario=0000000for self-billed integration/autofattura - Italian VAT self-assessed:
Imposta=Imponibile× Italian rate (reverse charge), not the foreign tax - Non-taxable/exempt operations carry the correct Natura instead of an
Imposta -
EsigibilitaIVAset (typicallyI); foreign-currency base converted to EUR - Sent to SdI within the deadline (sales 12 days; purchase integration by the 15th of the following month)
- Passes current SdI controlli; the integrated VAT reconciled in the registri IVA and LIPE
Last updated: 2026-06-04 — confirm the active tracciato/schema version, codici, and Agenzia delle Entrate / SdI requirements against the current specifications before use.