formats4 min read

Spain's SPFE Explained: UBL 2.5, Sender-Side Validation, and the Hybrid Model

How Spain's public e-invoicing platform (SPFE) actually works: UBL 2.5 format, XSD/Schematron sender-side validation, and the hybrid public/private routing model.

By EU E-Invoicing HubPublished: 10 September 2026

Spain's SPFE Explained: UBL 2.5, Sender-Side Validation, and the Hybrid Model

Royal Decree 238/2026 set the legal framework and the deadlines for Spain's B2B e-invoicing mandate — but it left the technical detail to AEAT (the Spanish tax agency). On 1 June 2026, AEAT published the first complete technical picture of how its public e-invoicing platform, the SPFE (Solución Pública de Facturación Electrónica), will actually work: a functional document and a technical brief, together spelling out the format, validation model, and routing architecture businesses will need to build against.

This article covers what those documents say, separately from the legal timeline covered in our Spain complete guide.

The Format: UBL 2.5, Not Facturae

The SPFE uses UBL 2.5, aligned with EN 16931-1:2026 — the current version of the European semantic e-invoicing standard. This confirms what the draft Ministerial Order had already signalled: UBL, not Spain's older national Facturae format, is the syntax for the public platform. Facturae remains usable for the B2B mandate, but only when invoices are routed through an accredited private platform rather than the SPFE directly — see our Facturae vs UBL comparison for the full breakdown.

Validation Happens on the Sender's Side

A detail that catches some vendors off guard: AEAT will not run a production validation service. Instead, the technical brief sets out a two-layer validation model that senders must implement themselves before submission:

  1. XSD validation — checks that the XML document is well-formed and structurally valid UBL 2.5
  2. Schematron validation — checks the EN 16931 business rules (mandatory fields, code lists, calculation consistency)

Invoices are submitted and retrieved through synchronous web services. In practice, this means your invoicing software or platform needs to embed both validation layers itself — pointing a raw, unvalidated document at the SPFE and expecting AEAT to catch formatting errors is not how the system is designed to work.

The Hybrid Model: Public Platform or Private, Not Both in Isolation

The SPFE does not require every business to route invoices through the free government platform. AEAT's guidance confirms a hybrid model:

  • Businesses may exchange invoices directly through the SPFE, or
  • Businesses may use an accredited private platform instead

The two options aren't fully separate tracks, though: if a business uses a private platform, that platform must still send a faithful electronic copy of the invoice to the SPFE at the time of issuance. AEAT's public platform functions as a mandatory transparency layer even for invoices that never touch it directly for delivery — every structured B2B invoice ends up visible to the tax authority one way or another.

Why This Matters Before the Ministerial Order Is Finalized

The Ministerial Order that will formally activate these rules had not yet entered into force as of this writing — it's expected to take effect around 1 October 2026, after which the compliance clock starts running toward the 1 October 2027 (turnover above €8 million) and 1 October 2028 (everyone else) deadlines. AEAT's June 2026 technical documents, plus a technical webinar the agency scheduled for developers, are the clearest signal so far of the shape the final specification will take — but as with any pre-final guidance, some details could still shift before the Ministerial Order is published in the BOE.

What Spanish Businesses and Vendors Should Do Now

  1. If you're building or evaluating a private platform integration, confirm it can produce a compliant electronic copy to the SPFE, not just deliver invoices to your trading partner — that copy obligation is part of the architecture, not optional.
  2. Ask your software vendor how they handle XSD/Schematron validation — since AEAT won't validate for you, a vendor that can't demonstrate its own validation pipeline is a real integration risk.
  3. Don't wait for the Ministerial Order to start technical planning — the June 2026 technical guidance is detailed enough to begin architecture decisions now, even though some specifics may still be refined.

Source

VATupdate, "AEAT Publishes Technical Guidance on the Public Electronic Invoicing Solution (SPFE) for Mandatory B2B E-Invoicing"; ClearTax, "AEAT's Two New SPFE Documents: Spain's Public E-Invoicing Solution Explained".


Last updated: September 2026. We track official sources (AEAT, BOE, European Commission) and update this guide as the Ministerial Order and SPFE specification are finalized.

e-invoicingspainspfeublcrea-y-creceformats20272028