XSD Agencia Tributaria (AEAT) · 1.0

VERI*FACTU invoice records

VERI*FACTU invoice records (Spain, RegFactuSistemaFacturacion)

The invoice records a Spanish invoicing system sends to the AEAT under VERI*FACTU: one record per invoice issued (alta) or cancelled (anulación), chained by their SHA-256 fingerprints.

About

Real Decreto 1007/2023 (the Reglamento VERI*FACTU) sets what invoicing software in Spain must do: keep a record of every invoice, chain the records with a fingerprint (huella) and print a QR code on the invoice. Under Real Decreto-ley 15/2025, companies paying corporate tax must use such software from 1 January 2027 and everyone else from 1 July 2027.

RegFactuSistemaFacturacion is the message a VERI*FACTU system sends: a header with the taxpayer and up to 1000 records, each a RegistroAlta for an invoice issued or a RegistroAnulacion for one cancelled, with its breakdown by tax, the totals, the link to the previous record and the software that made it.

E-invoicing in Spain: the rules in short and how to check an invoice →

Good to know

  • The schema checks structure and data types. The AEAT checks much more when it receives the records (NIF census, totals, chaining, fingerprints, dates), listed in its validations and errors document; those checks are not run here.
  • The schemas are the AEAT's SuministroLR.xsd and SuministroInformacion.xsd. The XML Signature import points at a local copy of the W3C schema; nothing else is changed.
  • Records sent to the AEAT travel inside a SOAP envelope; validate the RegFactuSistemaFacturacion element on its own.
  • The example is by xmlvalid.com, with made-up companies: the first record of a chain for one invoice at 10% VAT, with its fingerprint computed as the AEAT's specification describes.

Files

3 files · 60.1 KB

The validator loads all of these with their folder structure, so includes and imports resolve as published.

Example document

verifactu-alta.xml · 3 KB · valid against this schema

In CI and from code

The same schema by its name, verifactu-1.0, through the API.

npx @xmlvalid/cli validate "**/*.xml" --schema verifactu-1.0
- uses: xmlvalid/validate-action@v1
  with:
    files: "**/*.xml"
    schema: verifactu-1.0
    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=verifactu-1.0

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