ediverse Explore the platform

Spotlight PEPPOL BIS Billing 3.0 The EU e-invoicing mandate is here — France Sept 2026, Belgium Jan 2026, Germany 2025.

FatturaPA: the detailed XML specification

The FatturaPA format is an XSD XML schema published by AdE, root element p:FatturaElettronica, structured as one header and one or more bodies per invoice. The spec is EN 16931 compliant via the CIUS Italia, and electronically signed in CAdES-BES (.p7m) or XAdES-BES.

XSD structure

The FatturaPA XSD defines a root type FatturaElettronicaType with two main children: a unique FatturaElettronicaHeader and one or several FatturaElettronicaBody. Each body is a distinct invoice (so a single file can hold up to 50 invoices for the same issuer / recipient couple).

xml Schema_FatturaPA_v1.2.xsd
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema
  xmlns="http://ivaservizi.agenziaentrate.gov.it/docs/xsd/fatture/v1.2"
  xmlns:xs="http://www.w3.org/2001/XMLSchema"
  targetNamespace="http://ivaservizi.agenziaentrate.gov.it/docs/xsd/fatture/v1.2"
  elementFormDefault="qualified"
  attributeFormDefault="unqualified"
  version="1.8">

  <xs:element name="FatturaElettronica" type="FatturaElettronicaType"/>

  <xs:complexType name="FatturaElettronicaType">
    <xs:sequence>
      <xs:element name="FatturaElettronicaHeader" type="FatturaElettronicaHeaderType"/>
      <xs:element name="FatturaElettronicaBody" type="FatturaElettronicaBodyType"
                  minOccurs="1" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="versione" type="FormatoTrasmissioneType" use="required"/>
    <xs:attribute name="SistemaEmittente" type="SistemaEmittenteType" use="optional"/>
  </xs:complexType>
</xs:schema>

Three main blocks structure the FatturaElettronicaHeader:

  • DatiTrasmissione — IdTrasmittente (who transmits), ProgressivoInvio (sequence counter), FormatoTrasmissione (FPR12 / FPA12), CodiceDestinatario or PECDestinatario.
  • CedentePrestatore — supplier data: DatiAnagrafici (IdFiscaleIVA, CodiceFiscale, Anagrafica, RegimeFiscale), Sede (address). Optional: StabileOrganizzazione, RappresentanteFiscale.
  • CessionarioCommittente — customer data: DatiAnagrafici (IdFiscaleIVA if B2B, CodiceFiscale if B2C), Sede.

The FatturaElettronicaBody contains four major blocks:

  • DatiGenerali — DatiGeneraliDocumento (TipoDocumento, Divisa, Data, Numero, totals, Causale, ImportoTotaleDocumento, Arrotondamento, Art73), DatiOrdineAcquisto, DatiContratto, DatiDDT, DatiTrasporto.
  • DatiBeniServizi — DettaglioLinee (NumeroLinea, TipoCessionePrestazione, CodiceArticolo, Descrizione, Quantita, UnitaMisura, PrezzoUnitario, ScontoMaggiorazione, PrezzoTotale, AliquotaIVA, Natura, RiferimentoNormativo), DatiRiepilogo (per IVA rate).
  • DatiVeicoli — for intra-EU sales of new transport means (Art. 38 DL 331/93).
  • DatiPagamento — CondizioniPagamento (TP01/TP02/TP03), DettaglioPagamento (Beneficiario, ModalitaPagamento MP01-MP23, DataRiferimentoTerminiPagamento, ImportoPagamento, IBAN, CodiceBIC).
xml full-invoice.xml
<?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>00001</ProgressivoInvio>
      <FormatoTrasmissione>FPR12</FormatoTrasmissione>
      <CodiceDestinatario>M5UXCR1</CodiceDestinatario>
    </DatiTrasmissione>
    <CedentePrestatore>
      <DatiAnagrafici>
        <IdFiscaleIVA><IdPaese>IT</IdPaese><IdCodice>01234567890</IdCodice></IdFiscaleIVA>
        <Anagrafica><Denominazione>ACME SpA</Denominazione></Anagrafica>
        <RegimeFiscale>RF01</RegimeFiscale>
      </DatiAnagrafici>
      <Sede><Indirizzo>Via Roma 1</Indirizzo><CAP>00100</CAP>
            <Comune>Roma</Comune><Provincia>RM</Provincia><Nazione>IT</Nazione></Sede>
    </CedentePrestatore>
    <CessionarioCommittente>
      <DatiAnagrafici>
        <IdFiscaleIVA><IdPaese>IT</IdPaese><IdCodice>09876543210</IdCodice></IdFiscaleIVA>
        <Anagrafica><Denominazione>Beta srl</Denominazione></Anagrafica>
      </DatiAnagrafici>
      <Sede><Indirizzo>Corso Italia 5</Indirizzo><CAP>20100</CAP>
            <Comune>Milano</Comune><Provincia>MI</Provincia><Nazione>IT</Nazione></Sede>
    </CessionarioCommittente>
  </FatturaElettronicaHeader>
  <FatturaElettronicaBody>
    <DatiGenerali>
      <DatiGeneraliDocumento>
        <TipoDocumento>TD01</TipoDocumento>
        <Divisa>EUR</Divisa>
        <Data>2026-05-19</Data>
        <Numero>2026-001</Numero>
        <ImportoTotaleDocumento>1220.00</ImportoTotaleDocumento>
      </DatiGeneraliDocumento>
    </DatiGenerali>
    <DatiBeniServizi>
      <DettaglioLinee>
        <NumeroLinea>1</NumeroLinea>
        <Descrizione>Technical consulting</Descrizione>
        <Quantita>10.00</Quantita>
        <PrezzoUnitario>100.00</PrezzoUnitario>
        <PrezzoTotale>1000.00</PrezzoTotale>
        <AliquotaIVA>22.00</AliquotaIVA>
      </DettaglioLinee>
      <DatiRiepilogo>
        <AliquotaIVA>22.00</AliquotaIVA>
        <ImponibileImporto>1000.00</ImponibileImporto>
        <Imposta>220.00</Imposta>
      </DatiRiepilogo>
    </DatiBeniServizi>
  </FatturaElettronicaBody>
</p:FatturaElettronica>

EN 16931 mapping (CIUS Italia)

The CIUS (Core Invoice Usage Specification) Italia, published in April 2024 jointly by AgID and AdE, formalises the bidirectional mapping between EN 16931 Business Group / Business Term and FatturaPA elements.

BG/BT EN 16931FatturaPA elementNotes
BT-1 Invoice numberDatiGeneraliDocumento/Numero20 chars max
BT-2 Issue dateDatiGeneraliDocumento/DataISO 8601 format (YYYY-MM-DD)
BT-3 Type codeDatiGeneraliDocumento/TipoDocumentoSee TD table below
BT-5 Invoice currencyDatiGeneraliDocumento/DivisaISO 4217, usually EUR
BG-4 SellerCedentePrestatoreIncludes DatiAnagrafici, Sede, IscrizioneREA, Contatti
BG-7 BuyerCessionarioCommittenteIncludes DatiAnagrafici, Sede, Rappresentante
BG-25 Invoice lineDettaglioLineeMultivalued — one linea per invoice line
BT-106 Sum of invoice line net amountsSum of PrezzoTotaleComputed on issuer side
BT-110 Invoice total VAT amountDatiRiepilogo/ImpostaPer IVA rate
BT-115 Amount due for paymentDatiGeneraliDocumento/ImportoTotaleDocumento

TipoDocumento codes (TD01-TD28)

The TipoDocumento field identifies the document type. Its value has a direct impact on downstream tax handling (IVA deduction, booking in purchases / sales, LIPE return).

CodeDescriptionTypical use
TD01FatturaStandard B2B/B2C/B2G invoice
TD02Acconto/Anticipo su fatturaDown payment / advance
TD03Acconto/Anticipo su parcellaProfessional fee down payment
TD04Nota di creditoCredit note
TD05Nota di debitoDebit note
TD06ParcellaProfessional fee (lawyer, doctor, expert)
TD16Integrazione fattura reverse charge internoDomestic RC self-invoice
TD17Integrazione/autofattura per acquisto servizi dall'esteroService purchase intra-EU or extra-EU
TD18Integrazione per acquisto beni intra UEIntra-EU goods purchase
TD19Integrazione/autofattura per acquisto da soggetti non residenti senza stabile organizzazioneNon-resident purchase
TD20Autofattura per regolarizzazioneArt. 6 c. 8 DL 471/97 regularisation
TD21Autofattura per splafonamentoIVA cap overrun
TD22Estrazione beni da Deposito IVAWithdrawal from IVA warehouse
TD23Estrazione beni da Deposito IVA con versamento IVA
TD24Fattura differita di cui all'art. 21 c. 4 lett. a)Monthly deferred invoice
TD25Fattura differita di cui all'art. 21 c. 4 lett. b)Triangulation deferred invoice
TD26Cessione di beni ammortizzabili e per passaggi interniSale of fixed assets
TD27Fattura per autoconsumo o per cessioni gratuite senza rivalsaSelf-consumption / free transfer
TD28Acquisti da San Marino con IVA (fattura cartacea)San Marino purchases (paper added)

Electronic signature CAdES / XAdES

Depending on the channel, signing is either mandatory or optional.

  • PEC or SDIcoop SOAP channel — detached CAdES-BES signature mandatory. Resulting file is IT01234567890_00001.xml.p7m.
  • SDIftp or web portal channel — enveloped XAdES-BES tolerated, or detached CAdES-BES.
  • Certificate — issued by a Prestatore di Servizi Fiduciari Qualificato (QTSP) listed in the AgID registry, eIDAS Regulation EU 910/2014 compliant.
  • Hash algorithm — SHA-256 (RFC 5754), SHA-1 refused since 2018.
  • Time-stamping — not mandatory at SdI level but required for subsequent conservazione sostitutiva (see dedicated page).

Versions 1.7 and 1.8

Schema version 1.7 was published on 8 February 2023 (Provvedimento AdE 30/2023) and went into production on 1 October 2023. Version 1.8, published on 21 February 2025, is mandatory since 1 April 2025. Major changes:

  • 1.7 — added TD28 codes (San Marino), N7 (Natura clarifications), enriched RiferimentoNormativo to 100 chars max, CIUS Italia Schematron support.
  • 1.8 — EN 16931 ViDA-ready alignment, extended UNICODE encoding, GLN support in IdFiscaleIVA/IdCodice (for PEPPOL bridge transmissions), new Natura codes N3.4 / N3.5 / N3.6 for specific cross-border operations.

Most common XSD and SdI errors

CodeCauseAction
00200File does not conform to XSDRe-validate locally against v1.8
00201More than 50 fatture in the same fileSplit into multiple uploads
00300Issuer IdFiscaleIVA/IdCodice invalidCheck VAT checksum
00400Two DatiRiepilogo elements with same AliquotaIVA and NaturaGroup into a single riepilogo line
00417IdFiscaleIVA and CodiceFiscale both absent for CessionarioCommittenteProvide at least one
00422Invoice Numero already receivedIncrement or avoid duplicate
00430TipoDocumento incompatible with NaturaCross-check TD with expected Natura
00471Cedente/Cessionario identical (mishandled self-invoice)Use TD20-TD27 as appropriate
00474ImponibileImporto + Imposta != PrezzoTotaleRecalculate with 2-decimal rounding