FatturaPA 1.2.3
Fattura elettronica (FPA12, FPR12) with the SdI checks
The Italian e-invoice: the XML that invoices to the public administration, between businesses and to consumers are sent in through the SdI (Sistema di Interscambio), checked against the schema and the SdI's own checks on the file.
About
Italy has required electronic invoices for the public administration since 2014–2015 and between private parties since 2019. They are FatturaPA XML files sent through the Sistema di Interscambio, which rejects a file that fails the schema or one of its checks and answers with a rejection receipt (ricevuta di scarto) listing error codes.
Version 1.2.3 is one schema for both transmission formats: FPA12 (to the public administration) and FPR12 (between private parties), chosen with the versione attribute of FatturaElettronica.
After the schema, the SdI checks run here with the codes the SdI answers with: VAT rates and nature codes (00400, 00401, 00429, 00430, 00443, 00444, 00445), the totals of lines and summaries (00421, 00422, 00423), the recipient code (00427, 00313), document types (00471 to 00475), invoices repeated in one file (00409) and more.
E-invoicing in Italy: the rules in short and how to check an invoice →
Good to know
- The SdI checks are written by xmlvalid after Appendice 1 of the Specifiche tecniche 1.9.1 (31 March 2026, in use from 15 May 2026) and the pseudocode of the Elenco dei controlli 1.9; Agenzia delle Entrate publishes no machine-readable rules. They run only when the document matches the schema.
- Checks that need the SdI's records are not run: the Anagrafe Tributaria and IPA lookups (00300 to 00327, 00311, 00312), invoices sent before (00404), declarations of intent (00477), the file name and the signature. Instead, our XV-IT rules check the check digits of the partita IVA and codice fiscale, which the lookup cannot pass without.
- Where the documents leave room we take the lenient reading: 00422 allows one euro, as the Italian Allegato says (the English translation says one cent), and a discount given both as a percentage and an amount passes 00423 if either gives the line total.
- The schema is the one Agenzia delle Entrate publishes as Schema_VFPR12_v1.2.3.xsd; the XML Signature import points at a local copy.
- The examples are Agenzia delle Entrate's own, published with the Specifiche tecniche 1.9.1 (one of them signed).
Files
2 files · 75.7 KB-
Schema_VFPR12_v1.2.3.xsd main
-
xmldsig-core-schema.xsd
The validator loads all of these with their folder structure, so includes and imports resolve as published.
Business rules
Schematron · run in this order-
SdI checks (FatturaPA ordinary invoice) Specifiche tecniche 1.9.1
xmlvalid, after the checks Agenzia delle Entrate lists for the SdI · MIT
The rules run after the schema check, only when the document matches the schema, and in your browser like the schema check (with SaxonJS by Saxonica). Each finding names its rule, such as BR-CO-15, and the line it points at; each rule has a page with what it checks.
Example document
ITHVQWPH73P42H501Y_00023.xml · 2.2 KB · passes the schema and the rules
In CI and from code
The same schema by its name, fatturapa-1.2.3, through the API.
npx @xmlvalid/cli validate "**/*.xml" --schema fatturapa-1.2.3
- uses: xmlvalid/validate-action@v1
with:
files: "**/*.xml"
schema: fatturapa-1.2.3
api-key: ${{ secrets.XMLVALID_API_KEY }}
curl https://xmlvalid.com/api/v1/validations \
-H "Authorization: Bearer $XMLVALID_API_KEY" \
-F document={{ $schema->example ?? 'document.xml' }} -F schema=fatturapa-1.2.3
Free accounts get 100 API validations a month. On Pro, a URL monitor can check a published document against this schema every hour and email you when it breaks. More CI setups