Not tax advice. Computation tools only. Have a professional check your work before filing.
openaccountants/skills/italy-einvoice.md

Use this skill with your AI agent

View on GitHub

Paste this skill into your AI agent's context, or save the file to your project. Works with any AI agent that reads markdown.

italy-einvoice.md315 lines15.3 KB
v10Italy
Not yet verified by an accountantContact accountant
1---
2name: italy-einvoice
3description: >
4 Use this skill whenever asked about Italian e-invoicing, FatturaPA, Sistema di Interscambio (SDI), electronic invoicing compliance in Italy, Codice Destinatario, PEC invoicing, fattura elettronica, TD document types, cross-border e-invoicing via SDI, conservazione sostitutiva, or any question about issuing, receiving, validating, or archiving electronic invoices in Italy. Also trigger when preparing or reviewing XML invoices for SDI submission, handling SDI rejection (scarto) errors, configuring Codice Destinatario or PEC routing, or advising on FatturaPA technical format compliance. This skill covers the FatturaPA XML schema, SDI transmission channels, mandatory fields, validation rules, archiving, penalties, and interaction with Italian VAT returns. ALWAYS read this skill before touching any Italian e-invoicing work.
5version: 1.0
6jurisdiction: IT
7category: invoicing
8depends_on:
9 - einvoice-workflow-base
10---
11 
12# Italy E-Invoicing -- FatturaPA / SDI Skill v1.0
13 
14---
15 
16## Section 1 -- Quick Reference
17 
18| Field | Value |
19|---|---|
20| Country | Italy (Repubblica Italiana) |
21| Currency | EUR |
22| E-invoicing system | Sistema di Interscambio (SDI) |
23| Invoice format | FatturaPA XML (proprietary Italian schema) |
24| Governing body | Agenzia delle Entrate (AdE) |
25| Technical operator | Sogei S.p.A. |
26| Key legislation | Legislative Decree 127/2015; Ministerial Decree 55/2013; D.Lgs. 471/1997 (penalties); D.Lgs. 82/2005 (digital archiving) |
27| Portal URL | https://www.fatturapa.gov.it |
28| Current spec version | FatturaPA v1.9 (effective 1 April 2025) |
29| B2G mandatory since | 6 June 2014 |
30| B2B/B2C mandatory since | 1 January 2019 |
31| Current status | Fully operational -- all VAT-registered taxpayers must issue and receive via SDI |
32| EU derogation expires | 31 December 2027 (unless superseded by ViDA) |
33| Skill version | 1.0 |
34 
35---
36 
37## Section 2 -- Mandate Scope
38 
39### Who Must Comply
40 
41| Scope | Requirement |
42|---|---|
43| B2G | Mandatory for all suppliers to public administrations since 2014 |
44| B2B | Mandatory for all domestic transactions between VAT-registered businesses since 1 January 2019 |
45| B2C | Mandatory since 2019 -- consumer invoices must transit SDI (consumer receives PDF copy) |
46| Forfettari / micro-entities | Included since 1 January 2024 -- no remaining size-based exemptions |
47| Non-resident businesses | Must issue via SDI for Italian-taxable supplies if registered for VAT in Italy |
48| Cross-border | Reported via SDI using document types TD17, TD18, TD19, TD28 (replaced Esterometro from 1 July 2022) |
49 
50### Exemptions
51 
52- Invoices to/from entities in the Republic of San Marino follow a specific bilateral protocol (TD28)
53- Healthcare B2C invoices to natural persons remain excluded from SDI (privacy restrictions) through 2025
54- Invoices already transmitted through the NSO (Nodo Smistamento Ordini) for public healthcare orders
55 
56### Timeline Summary
57 
58| Date | Milestone |
59|---|---|
60| June 2014 | B2G mandate begins |
61| January 2019 | B2B and B2C mandate for all except forfettari |
62| July 2022 | Esterometro abolished -- cross-border reporting migrates to SDI |
63| January 2024 | Forfettari / micro-entities brought into scope |
64| April 2025 | FatturaPA v1.9 specifications effective (TD29, RF20 updates) |
65| December 2027 | Current EU derogation expiry |
66 
67---
68 
69## Section 3 -- Technical Format
70 
71### Format Specification
72 
73| Parameter | Value |
74|---|---|
75| Format | FatturaPA XML (proprietary, not EN 16931) |
76| Schema version | v1.9 (VFSM10.xsd) |
77| Root element | `<FatturaElettronica>` |
78| Versioning attribute | `versione="FPR12"` (B2B/B2C) or `versione="FPA12"` (B2G) |
79| Encoding | UTF-8 |
80| Max file size | 5 MB per XML file |
81| Namespace | `http://ivaservizi.agenziaentrate.gov.it/docs/xsd/fatture/v1.2.2` |
82 
83### XML Structure
84 
85The FatturaPA file consists of three top-level complex types:
86 
871. **FatturaElettronicaHeader** (mandatory, single instance)
88 - `DatiTrasmissione` -- transmission data (sender ID, recipient code, format)
89 - `CedentePrestatore` -- seller/supplier identification
90 - `CessionarioCommittente` -- buyer identification
91 - `RappresentanteFiscale` -- tax representative (if applicable)
92 - `TerzoIntermediarioOSoggettoEmittente` -- third-party intermediary
93 
942. **FatturaElettronicaBody** (mandatory, repeatable for invoice lots)
95 - `DatiGenerali` -- general data (invoice number, date, document type, currency)
96 - `DatiBeniServizi` -- line items (goods/services description, quantity, price, VAT)
97 - `DatiPagamento` -- payment terms and conditions
98 - `DatiVeicoli` -- vehicle data (sector-specific)
99 - `Allegati` -- attachments (embedded base64)
100 
1013. **ds:Signature** (optional -- XAdES-BES for XML or CAdES-BES for .p7m)
102 
103### Document Types (TipoDocumento)
104 
105| Code | Description |
106|---|---|
107| TD01 | Standard invoice |
108| TD02 | Advance/down payment invoice |
109| TD04 | Credit note |
110| TD05 | Debit note |
111| TD06 | Fee note (parcella) |
112| TD07 | Simplified invoice |
113| TD16 | Reverse charge integration |
114| TD17 | Integration -- intra-EU purchases of services |
115| TD18 | Integration -- intra-EU purchases of goods |
116| TD19 | Integration -- imports (non-EU) |
117| TD24 | Deferred invoice |
118| TD25 | Deferred invoice from triangulation |
119| TD26 | Sale of depreciable assets / internal transfers |
120| TD27 | Self-billing for auto-consumption |
121| TD28 | San Marino purchases |
122| TD29 | Irregular supplier invoice reporting (new in v1.9) |
123 
124---
125 
126## Section 4 -- Mandatory Fields
127 
128### Header Fields (FatturaElettronicaHeader)
129 
130| XML Path | Field | Required |
131|---|---|---|
132| `DatiTrasmissione/IdTrasmittente/IdPaese` | Sender country code | Yes |
133| `DatiTrasmissione/IdTrasmittente/IdCodice` | Sender tax ID | Yes |
134| `DatiTrasmissione/ProgressivoInvio` | Progressive sending number | Yes |
135| `DatiTrasmissione/FormatoTrasmissione` | Format (FPR12 or FPA12) | Yes |
136| `DatiTrasmissione/CodiceDestinatario` | Recipient routing code (7 chars B2B, 6 chars B2G) | Yes |
137| `CedentePrestatore/DatiAnagrafici/IdFiscaleIVA` | Seller VAT number | Yes |
138| `CedentePrestatore/DatiAnagrafici/RegimeFiscale` | Tax regime code (RF01--RF20) | Yes |
139| `CedentePrestatore/Sede` | Seller registered address (full) | Yes |
140| `CessionarioCommittente/DatiAnagrafici` | Buyer identification (Partita IVA or Codice Fiscale) | Yes |
141| `CessionarioCommittente/Sede` | Buyer address | Yes |
142 
143### Body Fields (FatturaElettronicaBody)
144 
145| XML Path | Field | Required |
146|---|---|---|
147| `DatiGenerali/DatiGeneraliDocumento/TipoDocumento` | Document type (TD01, etc.) | Yes |
148| `DatiGenerali/DatiGeneraliDocumento/Divisa` | Currency (ISO 4217) | Yes |
149| `DatiGenerali/DatiGeneraliDocumento/Data` | Invoice date (YYYY-MM-DD) | Yes |
150| `DatiGenerali/DatiGeneraliDocumento/Numero` | Invoice number | Yes |
151| `DatiBeniServizi/DettaglioLinee/NumeroLinea` | Line number | Yes |
152| `DatiBeniServizi/DettaglioLinee/Descrizione` | Line description | Yes |
153| `DatiBeniServizi/DettaglioLinee/PrezzoUnitario` | Unit price | Yes |
154| `DatiBeniServizi/DettaglioLinee/PrezzoTotale` | Line total | Yes |
155| `DatiBeniServizi/DettaglioLinee/AliquotaIVA` | VAT rate (%) | Yes |
156| `DatiBeniServizi/DatiRiepilogo/AliquotaIVA` | Summary VAT rate | Yes |
157| `DatiBeniServizi/DatiRiepilogo/ImponibileImporto` | Taxable amount per rate | Yes |
158| `DatiBeniServizi/DatiRiepilogo/Imposta` | VAT amount per rate | Yes |
159| `DatiBeniServizi/DatiRiepilogo/EsigibilitaIVA` | VAT chargeability (I=immediate, D=deferred, S=split) | Yes |
160| `DatiPagamento/CondizioniPagamento` | Payment terms code | Yes (if payment section present) |
161| `DatiPagamento/DettaglioPagamento/ModalitaPagamento` | Payment method | Yes (if payment section present) |
162| `DatiPagamento/DettaglioPagamento/ImportoPagamento` | Payment amount | Yes (if payment section present) |
163 
164---
165 
166## Section 5 -- Transmission Method
167 
168### SDI Channels
169 
170| Channel | Description | Use Case |
171|---|---|---|
172| SDICoop (Web Service) | SOAP-based web service | High-volume automated B2B |
173| SDIFTP | Secure FTP with mutual TLS | Legacy system integration |
174| SPCoop | Public connectivity system | B2G via PA network |
175| PEC (Certified Email) | Posta Elettronica Certificata | Low-volume, initial setup |
176| Web Portal | fatturapa.gov.it upload | Manual submission |
177| Peppol | Via Peppol Access Point | Cross-border interoperability |
178 
179### Routing
180 
181- **CodiceDestinatario**: 7-character alphanumeric code registered with SDI (B2B). If unknown, use `0000000` and the invoice routes via PEC or the buyer's tax drawer (cassetto fiscale).
182- **B2G**: 6-character CodiceUnivocoUfficio from the IPA (Indice delle Pubbliche Amministrazioni).
183- **PEC fallback**: If CodiceDestinatario is `0000000`, the buyer's PEC address registered with AdE is used.
184 
185### Submission Deadlines
186 
187| Invoice Type | Deadline |
188|---|---|
189| Immediate invoice | 12 days from transaction date |
190| Deferred invoice (TD24) | 15th of month following the reference month |
191| Cross-border (TD17--TD19) | 15th of month following receipt of foreign invoice |
192 
193### SDI Processing Flow
194 
1951. Sender transmits XML (signed or unsigned) to SDI
1962. SDI performs format and content validation
1973. If valid → SDI delivers to recipient and issues delivery receipt (Ricevuta di Consegna)
1984. If invalid → SDI issues rejection notice (Notifica di Scarto) within 5 days
1995. Rejected invoices are treated as never issued -- must be corrected and resubmitted within 5 days
200 
201---
202 
203## Section 6 -- Validation Rules
204 
205### SDI Pre-Checks (Automated)
206 
207| Check | Error Code Range | Description |
208|---|---|---|
209| Schema validation | 00001--00100 | XML does not conform to FatturaPA XSD |
210| Duplicate detection | 00404 | Same sender, invoice number, date, and recipient already processed |
211| VAT number validation | 00301--00305 | IdFiscaleIVA not registered in Anagrafe Tributaria |
212| CodiceDestinatario | 00311 | Invalid or unregistered routing code |
213| Digital signature | 00200--00205 | Signature invalid, expired, or non-conformant |
214| File naming | 00001 | File name does not follow convention: `IT{IdFiscale}_{progressive}.xml` |
215 
216### Common Rejection Reasons
217 
218| Issue | Resolution |
219|---|---|
220| Invalid Partita IVA | Verify against VIES or AdE registry |
221| Duplicate invoice number | Check progressive numbering; reissue with different number |
222| Incorrect TipoDocumento | Match document type to transaction (e.g., TD04 for credit notes) |
223| Missing Natura code | Required when AliquotaIVA = 0 (e.g., N1 for excluded, N2 for non-subject, N3 for non-taxable, N4 for exempt, N6 for reverse charge) |
224| Rounding errors | VAT amount must match: ImponibileImporto × AliquotaIVA / 100, rounded to 2 decimal places |
225| Expired digital certificate | Renew CAdES or XAdES certificate before submission |
226 
227---
228 
229## Section 7 -- Tax Computation Rules
230 
231### VAT Rates (2025/2026)
232 
233| Rate | Application |
234|---|---|
235| 22% | Standard rate |
236| 10% | Reduced rate (hospitality, renovation, certain food) |
237| 5% | Super-reduced (specific goods) |
238| 4% | Minimum rate (essential food, books, first home) |
239| 0% | Zero-rated (exports, intra-EU supplies with valid VIES) |
240 
241### Rounding
242 
243- Line-level: `PrezzoTotale = PrezzoUnitario × Quantita`, rounded to 2 decimal places
244- Summary-level: `Imposta = ImponibileImporto × AliquotaIVA / 100`, rounded to 2 decimal places
245- Standard arithmetic rounding (0.5 rounds up)
246- SDI rejects invoices where computed VAT differs from stated VAT by more than EUR 1.00 per rate summary line
247 
248### Multi-Rate Invoices
249 
250Each VAT rate on the invoice must have its own `DatiRiepilogo` block with separate `ImponibileImporto` and `Imposta` totals. Line items are grouped by `AliquotaIVA`. The `Natura` code is required for any line with AliquotaIVA = 0.
251 
252### Split Payment (Scissione dei Pagamenti)
253 
254For B2G transactions and certain designated entities, the buyer withholds VAT and pays it directly to the Treasury. Set `EsigibilitaIVA` to `S` (split payment). The seller invoices the gross amount but receives only the net.
255 
256---
257 
258## Section 8 -- Archiving Requirements
259 
260| Requirement | Detail |
261|---|---|
262| Retention period | 10 years (conservazione sostitutiva) |
263| Format | Original XML as received/sent via SDI |
264| Digital signature | Time-stamped qualified electronic signature required on archived documents |
265| Metadata | Structured XML metadata per AGID (Agenzia per l'Italia Digitale) specifications |
266| Manuale della Conservazione | Written archiving policy document required, describing procedures and responsibilities |
267| Free AdE service | Agenzia delle Entrate offers free conservazione via "Fatture e Corrispettivi" portal -- covers invoices transiting SDI for 15 years (requires opt-in agreement) |
268| Third-party archiving | Must use AGID-accredited conservators (Conservatori Accreditati) |
269| Audit access | Tax authorities may request full read access to the archive at any time |
270 
271---
272 
273## Section 9 -- Penalties for Non-Compliance
274 
275| Violation | Penalty |
276|---|---|
277| Failure to issue e-invoice via SDI | 90%--180% of VAT amount per invoice (Art. 6, D.Lgs. 471/1997) |
278| Minimum fine (no VAT impact) | EUR 250--2,000 per invoice |
279| Late submission to SDI (correct VAT settlement) | EUR 250--2,000 per document |
280| Failure to report cross-border (TD17/TD18/TD19) | EUR 250--2,000 per transaction |
281| Failure to maintain compliant digital archive | Penalties under D.Lgs. 82/2005 (Codice dell'Amministrazione Digitale) |
282| Rejected invoice not corrected within 5 days | Invoice treated as never issued -- full non-issuance penalties apply |
283| Reduced penalty (ravvedimento operoso) | Reduced to 1/9 if corrected within 90 days; 1/8 within annual return deadline |
284 
285---
286 
287## Section 10 -- Interaction with Tax Skills
288 
289### VAT Return Integration
290 
291- All invoices transiting SDI are automatically available in the taxpayer's "Fatture e Corrispettivi" portal
292- AdE pre-populates quarterly VAT communications (LIPE) and the annual VAT return (Modello IVA) using SDI data
293- The pre-filled draft VAT return (dichiarazione precompilata IVA) has been available since 2021 for taxpayers who exclusively use SDI
294- Cross-border document types (TD17--TD19, TD28) automatically feed into the reverse charge and intra-EU acquisition sections of the VAT return
295- Discrepancies between SDI data and filed VAT returns trigger automated compliance letters (lettere di compliance)
296 
297### Income Tax Integration
298 
299- SDI data feeds into the pre-compiled income tax return (Modello Redditi PF precompilato) for self-employed individuals
300- Revenue figures from Box 1 of the income return should reconcile with total TD01/TD24 invoices issued via SDI
301- Forfettari regime taxpayers have flat-rate income computed from SDI-reported revenue
302 
303### Withholding Tax
304 
305- For professional services (TD06 parcella), the `DatiRitenuta` block in FatturaPA records withholding tax (ritenuta d'acconto) details
306- Withholding amount, rate, and payment type flow into the Certificazione Unica (CU) and Modello 770
307 
308---
309 
310## Disclaimer
311 
312This skill and its outputs are provided for informational and computational purposes only and do not constitute tax, legal, or financial advice. Open Accountants and its contributors accept no liability for any errors, omissions, or outcomes arising from the use of this skill. All outputs must be reviewed and signed off by a qualified professional (such as a commercialista, tax attorney, or equivalent licensed practitioner in your jurisdiction) before filing or acting upon.
313 
314The most up-to-date, verified version of this skill is maintained at [openaccountants.com](https://openaccountants.com). Log in to access the latest version, request a professional review from a licensed accountant, and track updates as tax law changes.
315 

Run this skill, then get an accountant to check it

After running the full skill pack in your AI agent, sign up and upload your worksheet. We'll connect you with a trusted accountant in our network who can review your numbers before you file.

Verification status

Research-verified

Drafted from authoritative sources (tax authority sites, Big-4 summaries). Awaiting credentialed sign-off.

Needs section-by-section practitioner review to reach accountant-verified.

Section review progress

0/27

About

Use this skill whenever asked about Italian e-invoicing, FatturaPA, Sistema di Interscambio (SDI), electronic invoicing compliance in Italy, Codice Destinatario, PEC invoicing, fattura elettronica, TD document types, cross-border e-invoicing via SDI, conservazione sostitutiva, or any question about issuing, receiving, validating, or archiving electronic invoices in Italy. Also trigger when preparing or reviewing XML invoices for SDI submission, handling SDI rejection (scarto) errors, configuring Codice Destinatario or PEC routing, or advising on FatturaPA technical format compliance. This skill covers the FatturaPA XML schema, SDI transmission channels, mandatory fields, validation rules, archiving, penalties, and interaction with Italian VAT returns. ALWAYS read this skill before touching any Italian e-invoicing work.

ITty-2025

Use this skill

This skill is open source and free to use in any AI agent. Copy it, download it, or clone the repo. If you find an error, report an issue — a licensed accountant will review.

9 of 13 in the IT workflow: