
FatturaPA XML Format: Complete Technical Guide for Italy E-Invoicing
Tax & Compliance Series
This guide is part of a comprehensive series. Explore all 202 topics:
What Is the FatturaPA XML Schema Structure?
The FatturaPA schema defines a structured XML document with three main sections:
The FatturaPA schema defines a structured XML document with three main sections:
1. FatturaElettronicaHeader
- DatiTrasmissione: Transmission data including sender ID, Codice Destinatario, and format type (FPR12 for B2B/B2C, FPA12 for B2G)
- CedentePrestatore: Supplier identification — VAT number, fiscal code, company name, registered address
- CessionarioCommittente: Buyer identification with the same detail level
2. FatturaElettronicaBody
- DatiGenerali: Invoice number, date, type code (TD01=invoice, TD04=credit note, TD24=deferred invoice), currency
- DatiBeniServizi: Line items with descriptions, quantities, unit prices, VAT rates (Natura codes for exempt/non-taxable items)
- DatiPagamento: Payment terms, method code (MP05=bank transfer, MP08=credit card, etc.), due dates
3. Attachments
Optional PDF or other document attachments encoded as base64, commonly used to include a human-readable version of the invoice.
What Are the Key Validation Rules?
SDI performs automated validation on every submitted invoice.
SDI performs automated validation on every submitted invoice. Common rejection reasons include:
| Error Code | Description | Fix |
|---|---|---|
| 00305 | Invalid Codice Destinatario | Verify recipient's 7-character code or use 0000000 with PEC |
| 00311 | Duplicate invoice number | Invoice number + date combination must be unique per year |
| 00400 | Invalid digital signature | Ensure XAdES-BES or CAdES-BES with valid certificate |
| 00423 | VAT calculation mismatch | Line totals must match header summary within €1 tolerance |
| 00471 | Invalid Natura code for zero-rate | Use correct N1-N7 code for exempt or non-taxable lines |
How Do Digital Signatures Work for FatturaPA?
Every FatturaPA file must carry a qualified electronic signature.
Every FatturaPA file must carry a qualified electronic signature. Italy accepts two formats:
- XAdES-BES: XML Advanced Electronic Signature — the signature is embedded within the XML structure
- CAdES-BES: Creates a .p7m envelope wrapping the entire XML file
The signing certificate must be issued by a qualified trust service provider recognized by AgID (Agenzia per l'Italia Digitale). Certificates typically cost €30–€80/year and are available from providers like Aruba, InfoCert, and Namirial.
What Is the Codice Destinatario System?
The Codice Destinatario is a 7-character alphanumeric code that identifies the recipient's preferred delivery channel on SDI. Businesses register their code through the Agenzia delle Entrate portal.
The Codice Destinatario is a 7-character alphanumeric code that identifies the recipient's preferred delivery channel on SDI. Businesses register their code through the Agenzia delle Entrate portal. If the recipient hasn't registered a code, the sender can use:
- 0000000: Fallback code — SDI delivers to the recipient's registered PEC email address
- XXXXXXX: Used for B2C invoices to consumers without a VAT number
How Does Invoicemonk Handle FatturaPA Compliance?
Invoicemonk automatically generates valid FatturaPA XML 1. 2.
Invoicemonk automatically generates valid FatturaPA XML 1.2.2 files with built-in validation against all SDI rules, preventing common rejection errors before submission. The platform handles digital signature application, Codice Destinatario lookup, and provides real-time SDI delivery status tracking.
More in this series (202 articles)
From this series
Stay audit-ready and compliant with tax regulations across different regions.
Related Topics
Digital Marketing, SEO Specialist, Content Creator & Product Professional
Olayinka is a digital marketer, content creator, growth and SEO specialist with 10+ years helping businesses in Nigeria, the UK, the US, Australia, and Dubai achieve their goals online.




