top of page

Spain’s New B2B E-Invoicing Framework: Technical and SAP Impact Analysis



1. Introduction

Spain is one of the leading countries in the European Union in terms of digital tax transformation.


E-invoicing and e-reporting processes have been actively used for years, and with new regulations, this structure is becoming more integrated. Especially for B2B transactions, upcoming obligations will not only cover invoice issuance but also payment tracking.


The current legal framework is built on Ley 18/2022 and its implementing regulation Real Decreto 238/2026, which established both the technical requirements for private e-invoicing platforms and the public platform (Solución Pública de Facturación Electrónica – SPFE) managed by the AEAT.



2. Current System


2.1 Facturae (E-Invoicing Standard)


Facturae is the XML-based e-invoicing standard used in Spain.


It has long been mandatory for public sector transactions (B2G), and with the adoption of Real Decreto 238/2026, Facturae is one of the accepted formats and is expected to play a key role, particularly in interactions with the public platform (SPFE), although the final technical specifications are subject to the forthcoming ministerial order.


It includes invoice data such as invoice number, date, parties, tax details, and totals, secured by an advanced electronic signature following the XAdES-EPES (XML Advanced Electronic Signatures – Explicit Policy Electronic Signature) standard. However, it does not include actual payment status.


Payment lifecycle information — such as acceptance, rejection, and payment confirmation — is communicated separately through the estados de la factura mechanism introduced by Ley 18/2022.



2.2 SII (E-Reporting System)



Figure: Example of the AEAT SII interface showing invoice records for received invoices, illustrating the data-based nature of the current e-reporting system
Figure: Example of the AEAT SII interface showing invoice records for received invoices, illustrating the data-based nature of the current e-reporting system

SII is mandatory for large taxpayers with an annual turnover exceeding €6 million, VAT groups, and major exporters registered under the monthly VAT refund scheme (REDEME).


It is an e-reporting system that requires invoices to be reported to the tax authority within 4 calendar days of the transaction (excluding Saturdays, Sundays, and national holidays). It includes sales, purchase, and correction invoices. It strengthens tax control but does not track payments.


Notably, companies already subject to SII may be exempt from certain VERI*FACTU obligations, as SII provides an equivalent level of real-time reporting to the AEAT.




3. Mandatory B2B E-Invoicing




With new regulations — specifically Ley 18/2022 and its implementing regulation Real Decreto 238/2026 — B2B e-invoicing will become mandatory for all businesses and self-employed professionals (autónomos) operating in Spain.


Companies with an annual turnover exceeding €8 million will be subject to the obligation 12 months after the entry into force of the required ministerial order, while all remaining businesses and professionals will follow 24 months after that same date.


The new model will cover the entire invoice lifecycle, not just invoice creation.




3.1 Invoice Lifecycle Management



Invoices will be tracked from creation to closure, including issuance, delivery, acceptance/rejection, payment, and closing. This lifecycle is managed through the estados de la factura (invoice status) mechanism, which requires both the issuer and the recipient to communicate status updates through their respective platforms.


Each status change is expected to be reported within short timelines (potentially aligned with existing frameworks such as 4 days), subject to final regulatory clarification.


If a company has not publicly designated a private platform as its invoice entry point, the AEAT-managed public platform (Solución Pública de Facturación Electrónica – SPFE) is assumed to be its default entry point by law.



3.2 Mandatory Payment Tracking


Companies will be required to report payment status, payment dates, and partial payments. This enables monitoring of financial flows and late payments.


Under Real Decreto 238/2026, the mandatory estados include at minimum: commercial acceptance or rejection of the invoice and its date, and full payment and its effective date.


Additionally, platforms may optionally support partial acceptance or rejection, partial payment, and assignment of the invoice to a third party for collection.


Payment status information must also be simultaneously forwarded to the SPFE, meaning platforms ensure that invoice and status data are also communicated to the SPFE, typically requiring coordinated or parallel reporting flows depending on the implementation model.


It is worth noting that for companies with an annual turnover below €6 million, the estados obligation is deferred: 36 months after the regulation takes effect for companies, and 48 months for self-employed professionals.



3.3 VERI*FACTU System


VERI*FACTU ensures invoices are generated in an immutable way and prevents manipulation by storing each invoice securely. It is a specific compliance status granted to invoicing software systems (Sistemas Informáticos de Facturación – SIF) that continuously and automatically transmit invoice records to the AEAT in real time.


Each invoice record is cryptographically chained to the previous one using a hash mechanism, making any retrospective alteration detectable.


Systems that achieve VERI*FACTU status benefit from a simplified compliance path: they are exempt from additional technical audits under Artículo 8 of Real Decreto 1007/2023, and they are not required to apply a full advanced electronic signature — a hash is sufficient.


It is important to distinguish VERI*FACTU from the B2B e-invoicing platform obligation: VERI*FACTU is a tax reporting mechanism between a company and the AEAT, whereas the B2B platform system governs the exchange of invoices between two businesses.



4. Current vs New System



The current system separates e-invoicing and reporting, while the new system integrates them and introduces payment tracking, transforming it into a dynamic financial monitoring system.


Under the current framework, Facturae handles invoice formatting and digital signing for B2G transactions, while SII operates as a parallel and independent reporting channel through which large taxpayers submit invoice data directly to the AEAT within 4 calendar days — with neither system communicating invoice status or payment outcomes between trading parties.


The new framework established by Ley 18/2022 and Real Decreto 238/2026 fundamentally changes this architecture: private e-invoicing platforms and the AEAT-managed public platform (SPFE) form a unified two-layer ecosystem in which the same invoice is transmitted between businesses, its status tracked through mandatory estados de la factura notifications, and a faithful copy simultaneously deposited in the SPFE — all within a single, connected flow.


Furthermore, VERI*FACTU adds an additional layer of integrity to the new system by ensuring that invoicing software generates tamper-proof, cryptographically chained records that are reported to the AEAT in real time, replacing the retrospective and fragmented nature of the old reporting model.


The result is a system where invoice issuance, inter-business delivery, payment lifecycle tracking, and tax authority oversight no longer operate in silos but as interconnected stages of a single, auditable process.



5. Impact on SAP Systems


ERP systems such as SAP will require enhancements to comply with Spain's new B2B e-invoicing framework established by Ley 18/2022 and Real Decreto 238/2026.


Invoice, payment, and clearing data must be tracked and reported. Open item management, partial payments, and real-time integration become critical. Specifically, SAP environments must be capable of generating structured electronic invoices in one of the legally accepted formats — CII, UBL, EDIFACT, or Facturae — aligned with the EN16931 semantic data model, as required by Real Decreto 238/2026.


Invoices transmitted through private platforms typically require an advanced electronic signature (e.g., XAdES-EPES), depending on the format, and this requirement may be fulfilled either within the ERP system or via integration with an external signing service prior to transmission.


On the accounts payable side, SAP systems must be enhanced to send mandatory estados de la factura — at minimum, commercial acceptance or rejection and full payment confirmation with its effective date — within 4 calendar days of each status event, meaning that payment posting in SAP must trigger an automatic outbound status notification to the e-invoicing platform. For partial payments, which are treated as optional but reportable estados, SAP's open item management must be configured to capture and expose each partial clearing event individually rather than only at final settlement.


Finally, since every invoice exchanged through a private platform must simultaneously be copied to the AEAT-managed public platform (SPFE), the integration architecture must account for two parallel outbound flows: one to the counterparty's platform and one to the SPFE, both of which must be handled in real time without manual intervention.



6. Implementation Challenges


Challenges include integration complexity, data consistency, process redesign, and evolving regulations. On the integration side, the new framework requires companies to simultaneously connect their existing ERP or accounting systems to a private e-invoicing platform, ensure that platform is in turn interconnected with all other private platforms within a maximum of one month upon request, and maintain a live connection to the AEAT-managed public platform (SPFE) — all of which must be proven operational rather than merely theoretical before a platform can be admitted to the system. This multi-directional connectivity requirement, combined with the obligation to support four distinct invoice formats (CII, UBL, EDIFACT, and Facturae) and perform real-time format conversions while preserving the integrity and authenticity of the original electronic signature, makes the technical integration landscape significantly more complex than a standard e-invoicing rollout.


Data consistency presents a separate layer of difficulty: under Real Decreto 1007/2023, every invoice record generated by a Sistemas Informáticos de Facturación (SIF) must be cryptographically chained to the previous one through a hash mechanism, meaning that any gap, deletion, or out-of-sequence record is automatically treated as a compliance violation — a requirement that demands a level of data immutability and trazabilidad (traceability) that many legacy ERP configurations were not designed to provide. Process redesign is equally significant, as the estados de la factura mechanism fundamentally changes how accounts payable teams work: commercial acceptance or rejection and payment confirmation must each be communicated through the platform within 4 calendar days of occurring, which means payment posting, dispute handling, and partial clearing workflows must all be redesigned to trigger automated outbound notifications rather than remaining purely internal accounting events.


On the regulatory side, the challenge is not just the complexity of existing rules but the pace of change: Real Decreto 238/2026 was published on 31 March 2026 and entered into force on 20 April 2026, yet the ministerial order that will define critical technical details for the SPFE and set the clock running on the business compliance timeline has not yet been published as of this writing, meaning that companies and platform operators must build and certify systems against a regulatory framework that is still being finalized — requiring ongoing monitoring of AEAT's sede electrónica and BOE publications to ensure that no implementation decision becomes obsolete before go-live.



7. Conclusion



Spain's e-invoicing system is evolving into a combined invoice and payment tracking platform, requiring more advanced technical infrastructure and process management.


What distinguishes the Spanish approach from a standard e-invoicing mandate is the deliberate policy intent behind it: the framework established by Ley 18/2022 and implemented through Real Decreto 238/2026 was designed not primarily as a tax control tool, but as a structural response to the chronic problem of late commercial payments (morosidad comercial) that has long burdened Spanish businesses — particularly SMEs.


By making invoice issuance, delivery confirmation, acceptance or rejection, and payment date all machine-readable and reportable events flowing through a unified ecosystem of private platforms and the AEAT-managed public platform (SPFE), the Spanish legislator has created the legal and technical conditions for the Observatorio Estatal de la Morosidad Privada to monitor average payment periods across sectors and publish annual lists of companies that systematically breach payment deadlines under Ley 3/2004.


For companies and their ERP systems, this means that compliance is not a one-time implementation project but an ongoing operational commitment: invoice data, status updates, and payment confirmations must flow automatically, in real time, in legally compliant formats, across an interoperable network where no single platform can act as a gatekeeper. The regulatory framework itself remains in active development — the ministerial order that will operationalize the SPFE and start the compliance countdown has not yet been published as of April 2026 — meaning that organizations that invest now in adaptable, format-agnostic, and API-ready integration architectures will be better positioned to absorb future regulatory changes without having to redesign their systems from the ground up.


For SAP and ERP-driven organizations, this shift requires not only technical compliance but also a fundamental redesign of financial processes, positioning Spain as one of the most advanced e-invoicing ecosystems in Europe.





Comments


bottom of page