Editorial illustration of Italy's XML schema and technical format requirements for the italy fatturapa xml format guide guide
    E-Invoicing Compliance

    FatturaPA XML Format: Complete Technical Guide for Italy E-Invoicing

    Updated:
    9 min read

    Tax & Compliance Series

    This guide is part of a comprehensive series. Explore all 202 topics:

    Italy's FatturaPA XML format version 1.2.2 is the only accepted e-invoice format for the SDI system. Every domestic B2B and B2C transaction must use this schema, with invoices validated against 200+ rules before delivery. Understanding the technical requirements prevents the roughly 3–5% of invoices that get rejected by SDI due to format errors.

    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 CodeDescriptionFix
    00305Invalid Codice DestinatarioVerify recipient's 7-character code or use 0000000 with PEC
    00311Duplicate invoice numberInvoice number + date combination must be unique per year
    00400Invalid digital signatureEnsure XAdES-BES or CAdES-BES with valid certificate
    00423VAT calculation mismatchLine totals must match header summary within €1 tolerance
    00471Invalid Natura code for zero-rateUse 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.

    Tags:
    italy
    fatturapa
    xml
    sdi
    technical-guide
    OO
    Olayinka Olayokun

    Digital Marketing, SEO Specialist, Content Creator & Product Professional

    CIM Certified
    MBA in Digital Marketing and Business Transformation

    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.

    More from Tax & Compliance