Key fields in a FatturaPA e-invoice
A guide to the sections and field names in FatturaPA XML, so you can read an invoice even without a viewer.
Guides
A fattura elettronica (Italian e-invoice) is an XML file in the FatturaPA format specified by the Agenzia delle Entrate (Italian Revenue Agency). The file has a FatturaElettronicaHeader (invoice header) with details of the sender, supplier and customer, and one FatturaElettronicaBody (invoice body) for each invoice in the file.
The format
Start with FormatoTrasmissione (transmission format) in DatiTrasmissione (transmission details).
- FPR12 covers invoices to private-sector recipients such as businesses, professionals and consumers.
- FPA12 covers invoices to public authorities. These must be digitally signed.
- FSM10 is the simplified invoice format, normally available for amounts up to €400. The limit doesn’t apply under the RF19 (flat-rate) and RF20 (cross-border VAT exemption) regimes, or to documents that correct an earlier invoice referenced in
DatiFatturaRettificata. It has fewer fields.
Transmission details
CodiceDestinatario(recipient code) identifies the channel the customer uses to receive invoices. For private-sector recipients the code has seven characters. Use0000000if the customer receives invoices by PEC (Italian certified email) or has provided no channel, andXXXXXXXfor customers outside Italy. For a public authority, this is the six-character office code.PECDestinatario(recipient PEC address) gives the customer’s certified email address if that is how the invoice is delivered.ProgressivoInvio(transmission sequence number) is an identifier of up to 10 characters that the sender assigns to each transmission. The filename has its own unique sequence of up to five characters, which doesn’t have to match it.
Supplier and customer
CedentePrestatore (supplier) issues the invoice and CessionarioCommittente (customer) receives it. The XML includes the following fields for both parties.
IdFiscaleIVA(VAT identification) contains the country and the partita IVA (VAT number).CodiceFiscale(tax identification number) gives the codice fiscale, required for those without a VAT number, such as consumers.Anagrafica(name details) gives the company name or the person’s first and last names.Sede(address) includes the street address, postcode, municipality, province and country.
The supplier also has a RegimeFiscale (tax regime) field with a code from RF01 to RF20. The tax regime code table explains each code.
Document details
Look for these fields in DatiGeneraliDocumento (general document details).
TipoDocumento(document type) contains a code such as TD01 (invoice) or TD04 (credit note). See the document type code table.Divisa(currency) is usually EUR.Data(date) andNumero(number) give the invoice date and number.ImportoTotaleDocumento(invoice total) is the total declared by the supplier. It’s optional.Causale(description) is a free-text field.DatiBollo(stamp duty details) appears when the €2 stamp duty has been paid. It applies to invoices without VAT for more than €77.47.
Invoices to public authorities often include purchase order or contract references, with CIG (tender identification code) and CUP (project identification code).
Line items
Each entry in DettaglioLinee (line items) has a line number, Descrizione (description), PrezzoUnitario (unit price), PrezzoTotale (line total) and AliquotaIVA (VAT rate). Quantita (quantity) and UnitaMisura (unit) are optional and are often left out for services that aren’t measured in units. When the rate is zero, Natura (VAT treatment) explains why with a code from N1 to N7.
VAT summary
DatiRiepilogo (VAT summary) groups the lines by rate or VAT treatment, keeping lines with different EsigibilitaIVA (VAT chargeability), including split payment, in separate groups. It records these details for each group.
ImponibileImporto(taxable amount) andImposta(VAT) give the taxable base and VAT for the group.EsigibilitaIVA(VAT chargeability) can be I for immediate, D for deferred or S for split payment, which is common on invoices to public authorities.RiferimentoNormativo(legal reference) gives the legal basis for charging no VAT when a Natura code is present.
Add the taxable amounts and VAT in the summary to get the invoice total. The amount payable to the supplier may be lower after deducting any withholding tax and, under split payment, the VAT the customer pays directly to the Treasury.
Payment
In DatiPagamento (payment information), CondizioniPagamento (payment terms) gives the terms as instalments (TP01), payment in full (TP02) or advance payment (TP03). Each DettaglioPagamento (payment details) entry gives the ModalitaPagamento (payment method), such as MP05 for bank transfer, along with the due date, amount and, for a bank transfer, the IBAN and beneficiary.
Attachments
Allegati (attachments) can contain files supplied by the issuer, such as a PDF copy, a delivery document or a usage breakdown. Each attachment has a filename, format, optional description and Base64-encoded contents. The viewer decodes these files so you can download them.