B2B e-invoicing in Spain in short
Real Decreto 238/2026 of 25 March makes invoices between Spanish businesses and professionals electronic, except simplified invoices. It applies from a date counted from the ministerial order on the public solution: Orden HAC/1028/2026, in force since 6 October 2026. From then, companies with a turnover over 8 million euros in the previous year have twelve months, until October 2027, and everyone else twenty-four, until October 2028. During their first twelve months, the larger companies also send a PDF of each e-invoice unless the buyer agrees to the XML alone.
An invoice follows the EN 16931 data model in one of four syntaxes: UBL, CII, EDIFACT or Facturae. Businesses can send it through a private platform or through the AEAT's public solution (Solución Pública de Facturación Electrónica, SPFE), which takes UBL only and is free; a private platform sends the SPFE a faithful copy (copia fiel) of each invoice in UBL. Buyers report the status of invoices, including when they are paid in full.
The SPFE format is set by Anexo I of the Order: UBL invoices with the specification identifier (BT-24) urn:cen.eu:en16931:2026#conformant#urn:aeat.es:spfe:1.0.0:extended and Spanish fields such as the regime key of each line.
Two other formats are in force already. Suppliers of the public administration send Facturae invoices through FACe. And under the Reglamento VERI*FACTU, invoicing software keeps chained invoice records, which a VERI*FACTU system sends to the AEAT: from 1 January 2027 for companies paying corporate tax and from 1 July 2027 for everyone else (Real Decreto-ley 15/2025).
How to check a Spanish invoice
- Open the validator with the SPFE invoice profile, or the Facturae or VERI*FACTU one. A file opened or pasted picks the right one from its identifier or document element.
- Paste the XML or drop the file, then press Validate.
- Every finding shows its line; click it to jump there in the editor.
What is checked
For the SPFE, the UBL 2.5 schema: the first of the three checks the AEAT describes in its validations document (version 0.1.0, October 2026), with the normative schemas of the OASIS release that the AEAT names. The AEAT takes Invoice documents only, no credit notes.
The second check is the EN 16931 rules in their 2026 edition, which CEN has not yet published as validation artefacts. The current ones (1.3.17) reject the NIF written with schemeID "FC" that Anexo I asks for, so running them would fail correct invoices; we will add the rules when the 2026 edition is out. The third check is the AEAT's own business rules, which it will publish step by step.
For Facturae and VERI*FACTU, the schemas the Ministry of Finance and the AEAT publish. FACe checks the signature, and the AEAT checks the VERI*FACTU records on receipt (NIF census, totals, chaining); those checks are not done here.
The AEAT runs a validation service for SPFE invoices only in its test environment, with a certificate, one invoice at a time, and asks developers to validate locally. This page does that in your browser.
Profiles to check with
- Spain B2B e-invoice (SPFE, UBL 2.5): A Spanish B2B e-invoice in the format of the AEAT's public e-invoicing solution (SPFE), checked against the UBL 2.5 schema the AEAT validates with. Validate
- Facturae 3.2.2: The Spanish e-invoice format, required for invoices to the public sector through FACe. Validate
- VERI*FACTU invoice records: 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. Validate
- UBL 2.5 Invoice: The UBL invoice in its latest version, 2.5 (August 2026), the version Spain's public e-invoicing solution checks against. Validate
Questions
Is the invoice uploaded?
No. The schema check runs in your browser. Only the API and URL monitors validate on our servers.
Does a valid result mean the SPFE will accept the invoice?
Not yet: it means the invoice passes the UBL 2.5 schema. The SPFE also runs the EN 16931 rules (2026 edition) and the AEAT's business rules, which are not published as artefacts yet.
Why does the AEAT's example use a different business process (BT-23)?
Anexo I of the Order gives urn:aeat:names:specification:ubl:schema:profile:B2B, while the AEAT's example invoice has urn:aeat:names:specification:schema:profile:B2B. The schema accepts both; our example follows the Order.
Can I check invoices from code?
Yes: the API and the command-line client with --schema es-spfe-invoice, facturae-3.2.2 or verifactu-1.0, or --schema auto for a folder of mixed files.
Official sources
- BOE: Real Decreto 238/2026, B2B e-invoicing
- BOE: Orden HAC/1028/2026, the public e-invoicing solution, with Anexo I (PDF)
- AEAT developers: Solución Pública de Facturación Electrónica (SPFE), with the validations document and example
- AEAT: mandatory e-invoicing news, 31 March 2026
- AEAT: VERI*FACTU schemas
- BOE: Real Decreto-ley 15/2025, new VERI*FACTU dates
- OASIS: UBL 2.5
Other countries
- French e-invoice validator
- German e-invoice validator: XRechnung and ZUGFeRD
- Belgian e-invoice validator: Peppol BIS
- KSeF invoice validator: FA(3)
- Croatian eRačun validator
- RO e-Factura validator
- FatturaPA validator
- UAE e-invoice validator (PINT AE)
- InvoiceNow validator (PINT SG)
- JP PINT validator
- Australian e-invoice validator (PINT A-NZ)