Spain's B2B e-Invoicing Mandate and the Public e-Invoicing Solution (SPFE)
What Order HAC/1028/2026, published in the Official State Gazette (BOE) on 5 October 2026, sets out, what it means for companies running SAP, and how to be ready for 6 October 2027.
Client briefing · Updated October 2026 · CFOs, Finance, PMs
Download Full Briefing (PDF)5 Oct 2026
Order HAC/1028/2026 published: the clock starts
> 8M€
Mandatory from 6 Oct 2027 for companies above this turnover
6 Oct 2028
All other businesses and professionals
100%
of domestic B2B invoices will reach the AEAT
Key takeaway for finance leaders: connecting SAP directly to the SPFE avoids platform fees, but your company then owns every obligation: correct invoices, sending, statuses, payment reporting and its own archive — the SPFE is not a storage system.
Why This Law Exists
Law 18/2022 'Crea y Crece' made electronic invoicing mandatory between Spanish businesses. Its main goal is not tax collection but reducing late payment: to check payment terms, the State needs to see each invoice and whether it was accepted, rejected and paid.
Royal Decree 238/2026 designed the Spanish system: companies can use private e-invoicing platforms or the public solution run by the AEAT, or both. It also set the formats and the statuses to report. Order HAC/1028/2026, published in the BOE on 5 October 2026, is the last piece: it defines how the SPFE works and, by entering into force on 6 October 2026, starts the clock: 12 months for companies above €8M and 24 months for everyone else.
Law 18/2022 approved
RD 238/2026 published (in force 20 Apr)
1st AEAT developer seminar
EU notification procedure closed
2nd seminar: final order text and web services
Order HAC/1028/2026 published (in force 6 Oct)
The Three Texts
| Instrument | What it does | Published |
|---|---|---|
| Law 18/2022 'Crea y Crece' | Makes B2B e-invoicing mandatory; sets the €8M split and the one- and two-year phases | 28 September 2022 |
| Royal Decree 238/2026 | Designs the system: private platforms and the public solution, syntaxes, statuses, platform requirements and transitional rules; amends the invoicing regulation | BOE 31 March 2026; in force 20 April |
| Order HAC/1028/2026 | Regulates the SPFE's services, formats, unique code, status messages and access, and starts the deadlines | BOE 5 October 2026; in force 6 October |
What Changed with the Order
| Question | Before 5 October 2026 | Now |
|---|---|---|
| When does it apply? | 'Projected' dates, pending the order | 6 October 2027 and 6 October 2028, counted from the order's entry into force |
| How does the SPFE work? | Draft texts and AEAT seminars | Services, formats, statuses and access defined in a published order |
| Which format? | Several syntaxes discussed | EN 16931 in UBL for the SPFE; private platforms may exchange in four syntaxes |
| When is the SPFE ready? | Unknown | At least two months before the first obligations apply |
Three Things Every Finance Leader Should Know
- The AEAT sees every B2B invoice: issued through its own solution, or as a 'true copy' sent by a private platform at the moment of issue.
- Payment behaviour becomes visible: customers must report rejections and the date of full payment within four days, so the State can monitor late payment.
- Receiving matters as much as sending: from October 2027 your large suppliers will send you e-invoices, whatever your own date.
In Scope
Invoices between businesses and professionals where the issuer or the customer is established in Spain. Both sides: issuing and receiving invoices, plus reporting statuses and payments. Also invoices issued by third parties, or by the customer on the supplier's behalf (self-billing).
Out of Scope
Simplified invoices (tickets), unless they are qualified simplified invoices; certain gas and electricity operations, airline invoice clearing, and operations authorised by the Ministry of Economy. Special rules apply for the Basque Country and Navarre.
Who Is Most Exposed
| Profile | Why |
|---|---|
| Groups with several systems that bill | Numbering, routes and copies must work across all of them, from the same date |
| Companies with many small suppliers | Inbound volumes arrive in every format during the transition year |
| Long or disputed payment terms | Payment dates reported to the State make late payment visible |
| Companies outside SII | VERI*FACTU (2027 in the law today, with a postponement to October 2028 announced) and e-invoicing run on different clocks |
How It Fits with What You Already Report
Near real-time reporting of VAT invoice records (large companies and monthly-refund filers). Same invoices, same numbers and dates — must stay consistent with Crea y Crece.
Anti-fraud requirements for invoicing software (for companies not in SII). The SPFE free tool evolves from it; design both flows together.
The full e-invoice exchanged B2B, plus acceptance, rejection and payment statuses. New obligation — affects billing, accounts payable and treasury.
Cross-border B2B digital reporting from 1 July 2030. Next wave — a good design now avoids rework later.
Consent Is No Longer Needed
Until now, an e-invoice required the customer's agreement. The royal decree amends the invoicing regulation so that, where the mandate applies, electronic is the default and no prior consent is required.
The Mixed Model, Explained
Companies never send invoices directly to each other. Every invoice travels through a private platform or through the SPFE, and the AEAT always ends up with it, together with its status and payment date.
Invoices typed one by one on the AEAT website — for very low volumes.
SAP sends invoices directly by web service; customers download them from the SPFE.
A provider delivers the invoice to your customer, in its preferred format.
How an Invoice Reaches the Customer
- Where does the customer receive? Customers may publish an electronic entry point. If they have not, and there is no agreement, the default is the SPFE.
- Issue and sign: the invoice is issued in an admitted syntax; through private platforms it carries an advanced electronic signature.
- Exchange: between different platforms, the issuer's platform converts the syntax; without agreement, the SPFE's syntax applies.
- Copy to the AEAT: invoices not issued through the SPFE are copied to it at the same moment, in UBL, marked as a copy.
A Common Misunderstanding
'For software users this is transparent.' True if you buy packaged software. But a company that runs and adapts its own SAP and connects directly becomes responsible for everything a platform would otherwise do: valid invoices, sending, statuses, payment reporting and its own archive, because the SPFE is not a storage system. Make the choice deliberately, early, and per company.
Unique Invoice ID
Each invoice is identified by series + number + issue date + issuer tax ID. Two invoices can never share it — numbering must be unique across every system, company and branch that bills. A classic trap when several SAP systems or a billing engine issue invoices for the same company.
What Private Platforms Must Offer
- ISO/IEC 27001 or equivalent, with data-governance safeguards
- Secure exchange over AS2 or AS4
- Advanced electronic signatures and seals under eIDAS
- All four syntaxes, and conversion between them
- Business continuity and round-the-clock support
- Free interconnection with any other platform, live within one month of a request
- A public lookup of which businesses use them
Five Questions to Ask a Platform Provider
- Which SAP integration do you support, and who maintains it when the Spanish profile changes?
- How do you report statuses and payments on our behalf, and from which SAP data?
- What happens to true copies the SPFE rejects, and how do we see it in SAP?
- What do you archive, for how long, and how do we retrieve it in an audit?
- What does interconnection cost us? The law makes it free between platforms.
About the SPFE
The Solución Pública de Factura Electrónica is the AEAT's platform. It is intentionally simple — 'it is not an ERP' — but its role as repository is mandatory for every company.
Free Invoicing Tool
Web form to create invoices one at a time, download PDF and XML.
Status & Payment Management
Report acceptance, rejection, payment, collection and non-payment.
Interconnection
Exchange between companies without a platform ('last resort'). The SPFE does not push invoices: the customer must collect them.
Universal Repository
Holds every original and true copy. Invoices issued outside the SPFE must be copied there immediately.
The Services, in Business Terms
| Service | What it does for a company |
|---|---|
| Issue | Invoices sent individually or in batches; each receives a receipt with a secure verification code, or an error |
| True copy | Receives the copies sent by private platforms; rejects duplicates and copies of invoices already held |
| Recovery | The SPFE does not push invoices: customers, or their platforms, must collect what they receive |
| Statuses and payments | Customers report rejection and full payment; suppliers may report collection and non-payment |
| Consult and download | Issuers, customers and third-party issuers see invoices and their statuses |
| Annul | Erroneous submissions and status messages can be annulled, with a full audit trail |
Three Quality Checks
1. Format (UBL 2.5) · 2. European content rules (EN 16931) · 3. AEAT business rules. The AEAT asks everyone to check before sending.
Access
An electronic certificate for the web services; Cl@ve for the web form. Advisers and providers can act on your behalf with a registered power of attorney.
What the SPFE Is Not
Not a backup or archive: keep your own evidence. Not an ERP: no approvals, workflows or posting. No attachments embedded in invoices (links allowed).
The True Copy, in Practice
- Sent by the platform at the moment of issue, in UBL, flagged as a copy.
- Equivalent in meaning to the original, with at least the legally required content, and no embedded files.
- A rejected copy does not invalidate the original sent by the platform; but the cause must be fixed and the copy resent.
Availability and Outages
The SPFE must be available at least two months before the first obligations apply, so testing windows will be short. If it is unavailable for more than 24 hours, submissions may be made within four business days after the incident is resolved. Keep evidence of every outage.
Evidence to Keep
- Every invoice file as issued or received
- Every receipt and secure verification code
- Every status and payment message, and its answer
- Rejections and how they were resolved
- Outage incidents and late submissions
- The link from each file to the accounting document
Requirements
What the order asks for, translated into business requirements and the team that typically owns each one.
Every invoice meets the Spanish profile (Annex I) and passes the three checks.
Unique series and numbers across all companies, systems and branches.
Invoices (or true copies) sent immediately; receipt stored for each one.
Supplier invoices collected from the SPFE regularly and routed to accounts payable.
Rejections and full payments reported with dates.
Valid company certificate and powers of attorney, safely stored.
If the SPFE is down for 24 h, send within the next 4 business days — and keep evidence.
Own archive of invoices, receipts and statuses for the full legal period.
A European Standard with a Spanish Profile
The content follows the European standard EN 16931. Between private platforms, four syntaxes are admitted; whatever reaches the SPFE is in UBL. The order's first annex sets out the Spanish profile field by field.
| Syntax | Where it is used |
|---|---|
| UBL | The SPFE's syntax, for invoices issued through it and for every true copy; also Peppol-style networks |
| CII | The UN/CEFACT syntax, common in Germany and France |
| EDIFACT | Traditional EDI flows, notably retail and automotive |
| Facturae | Spain's own format, already used with the public sector |
The Spanish Additions
| Addition | What it is for |
|---|---|
| Copy indicator | Marks a true copy, distinguishing it from the original |
| Payment date on the invoice | For invoices already paid when issued: the customer then has no payment to report |
| Third-party issuer | Name, tax ID and type when an outsourced provider issues on the supplier's behalf |
| Other taxes and charges | Base, rate and amount for taxes other than VAT applied at document level |
What Changes in the Invoice Itself
- Corrective invoices: type and corrected amounts follow the European standard.
- Self-billing & third parties: specific codes when the customer, or an outsourced provider, issues the invoice.
- Tax identification: clear rules for seller and buyer tax IDs, so master data matters.
- VAT categories: new handling for travel agencies, second-hand goods, VAT groups and equivalence surcharge.
- Special taxes & charges: excise duties, registration tax, pass-through expenses and withholdings have their own place.
- Cash invoices: if already paid, the customer does not need to report payment.
- Additional data: the parties can agree data beyond the legal minimum.
Where Data Usually Breaks
| Pitfall | Consequence |
|---|---|
| Customer tax ID missing or wrong | Rejected at validation; the invoice is not issued |
| Tax code without a clear category | Wrong VAT category or exemption reason on the invoice |
| Credit memo without its original | Corrective invoice cannot reference what it corrects |
| Same number range in two systems | Duplicate identifiers; true copies rejected |
| Units and payment terms as free text | Codes the format expects cannot be filled |
Where This Lands in SAP
Each point maps to configuration you already have: tax codes, billing and accounting document types, number ranges, business partner data and output. The mapping work is rarely technical; it is about deciding, for every tax code and document type, what the Spanish profile expects, and testing it with real cases.
State & Payment Management
Every invoice starts as Accepted. If the customer does nothing, it stays accepted. From there, the customer must report rejections and payments; the supplier may report collections and non-payments.
Rejection (commercial, or 'not related to our business') and full payment (actual date and legal due date). Also tell the supplier directly whether the invoice is accepted or rejected. It may also report partial acceptance or rejection, partial payments and assignment of the invoice to a third party.
Collection (full amount) and non-payment. New: flag when the invoice was collected through factoring, confirming or discounting.
Rules Finance Teams Must Know
- Four days to report: statuses and payments within four calendar days, excluding weekends and national holidays.
- 'Paid' means paid in full: the mandatory payment status is the full payment date; partial payments are only reported voluntarily. A paid invoice cannot be paid again.
- Reported regardless of route: payment reporting applies whether the invoice travelled through the SPFE, a platform, or both; a platform can report on the customer's behalf.
- Disagreements are recorded, not resolved: if customer and supplier report different dates, the SPFE keeps both on record; it is resolved between them.
- Mistakes are annulled, not overwritten: an erroneous status message is cancelled, with a trail, and replaced.
Payment reporting for individuals and income-attribution entities with turnover up to €8M is deferred to 6 October 2029 (voluntary until then); their e-invoicing obligation still starts on 6 October 2028.
Where the Payment Date Comes From
| Payment method | The date to report, and the trap |
|---|---|
| Payment run, transfer | The value date of the payment; the run date is not always the same |
| Netting and compensation | The clearing date; design whether it counts as full payment |
| Confirming and reverse factoring | The date the customer pays, not when the supplier is advanced |
| Several partial payments | Only the payment that completes the invoice is mandatory |
| Paid when issued | Stated on the invoice itself; nothing to report afterwards |
An illustration of the four-day rule: an invoice paid in full on Thursday 8 April 2027 would be reported by Wednesday 14 April, skipping the weekend. Confirm counting rules with your adviser.
A Rejected True Copy: What to Do
| Cause | Action |
|---|---|
| Duplicate | Check numbering; annul and resend if the copy was wrong |
| Error only in the copy | Fix the copy and resend; the original remains valid |
| Error in the original | Issue a corrective or new invoice, and a new true copy |
Why This Is a Treasury Topic, Not Only a Tax One
Payment dates reported to the AEAT can be compared with the legal payment terms. Every late payment becomes visible, and so does every gap between what the customer reports and what the supplier reports. Accounts payable, treasury and the payment run must produce reliable payment dates by design.
Impact on SAP ERPs
SAP Document and Reporting Compliance (DRC) is SAP's standard solution for electronic documents and statutory reports. It runs inside S/4HANA, uses SAP Fiori apps, and connects to authorities through SAP Business Technology Platform (BTP). Many Spanish SAP customers already use it for SII and VAT returns.
Sales Invoices (Outbound)
- Billing document posted in SAP
- Electronic document created automatically
- Mapped to the Spanish profile and checked
- Sent to the SPFE or to a platform
- Receipt or error returned to the cockpit
Supplier Invoices (Inbound)
- Invoices collected from the SPFE or platform
- Shown in the cockpit as received documents
- Matched and approved in purchasing
- Posted and paid in the payment run
- Rejection or payment reported back
One Monitor
The eDocument Cockpit shows every invoice with a traffic-light status, the XML and PDF, and a link to the accounting document.
Automation
eDocuments are created when the invoice is posted and can be sent in scheduled background jobs; users only handle exceptions.
Reconciliation
Consistency checks compare SAP with the authority's records (existence, status, content) — already delivered for Spain.
Archiving
Standard eDocument archiving with retention rules — covering that 'the SPFE is not a backup'.
Statutory Reporting
The same framework runs VAT returns and other declarations with a compliance calendar.
Regulatory Updates
SAP delivers legal changes via SAP Notes; the Regulatory Change Manager shows their status.
SAP has indicated that it will cover Spain's B2B mandate within DRC, as it did for SII. Now that the order is published, track scope and release dates in SAP Notes and the Regulatory Change Manager, and plan to adopt the standard rather than build custom.
Choosing the Connection Route
Best for international groups, EDI-heavy or multi-format partners.
Best for mainly domestic B2B with a strong SAP team.
Best for large groups with a mixed customer base.
Platform Notes
| Your SAP | What to expect |
|---|---|
| SAP S/4HANA | Electronic documents and statutory reporting in one framework, with Fiori monitoring |
| SAP ERP 6.0 | Electronic documents only, with fewer features; and mainstream maintenance ends 31 December 2027 |
| SAP S/4HANA Cloud Public Edition | Standard country content, with limited room for extension |
What Changes, by Role
Payment behaviour becomes visible to the authorities; compliance risk sits in finance processes. Decisions: route, budget, sponsor and indicators.
Tax codes, document types and numbering must map to the Spanish profile; daily monitoring; SAP ↔ SPFE ↔ SII reconciliation. Decisions: who owns errors, and the month-end checks.
Supplier invoices arrive as data, not PDFs; formal rejections; payment dates reported for every invoice. Decisions: policy for disputes, netting and partial payments.
Customer rejections visible in SAP; optional collection and non-payment reporting; factoring and confirming flag. Decision: whether to report collections.
Correct tax IDs and addresses for every business partner. Clean-up before testing.
SAP Notes, BTP connectivity, certificates, user roles, test landscape, archiving. Decision: a plan built around SPFE availability.
Lessons Learned from SAP DRC Projects
- Roles and connectivity: they cause most issues; plan security and BTP set-up early.
- Stay on standard: custom middleware is complex and costly to maintain.
- Master data first: most rejections start with a wrong tax ID or tax code.
- Daily monitoring: by tax or accounting, with a clear path to sales, finance and IT for fixes.
- Right skills: the team needs SAP BTP and Fiori security experience, not only FI.
- One event, three flows: design SII/VERI*FACTU, e-invoice and payment status together.
How 30 Advisory Can Help
A founder-led boutique specialised in SAP DRC & e-invoicing, S/4HANA Finance and CFO/CIO advisory. We take you from the mandate to a working, auditable SAP solution.
Readiness assessment and route decision
Applicable date, companies affected, current SAP and invoicing landscape. Route decision (platform, direct or hybrid) with cost and risk analysis. You can take a first reading yourself with our DRC readiness scorecard.
Fit-gap and finance design
Fit-gap against the order and SAP DRC standard; finance design for tax codes, numbering, corrective invoices and payment statuses. One design for SII / VERI*FACTU, e-invoicing and payments.
eDocument Cockpit implementation
eDocument Cockpit implementation & configuration, SAP BTP connectivity, inbound and payment-status automation. Statutory reporting automation and reconciliation SAP ↔ SPFE.
End-to-end tests and cut-over
End-to-end tests in the AEAT test environment: rejections, duplicates, outages, payments. Cut-over, user training, procedures and evidence pack for auditors.
Ongoing monitoring and roadmap to ViDA
Ongoing compliance monitoring: SAP Notes, AEAT updates, KPIs and hypercare. Roadmap to ViDA (2030) and other country mandates.
Founder-led
Finance + SAP DRC depth
SAP DRC delivery: France and Germany
Boutique agility
What to Bring to the First Conversation
- Your Spanish companies and their turnover
- The systems that issue invoices for each
- Your SAP release and SII or VERI*FACTU status
- Any platform contracts already in place
- Invoice and supplier volumes, roughly
- Who owns e-invoicing today
Crea y Crece, ViDA and your S/4HANA plans in one programme. Follow our ViDA Tracker at 30advisory.com.
Legal & Auditor Roles
The AEAT does not certify software: it publishes rules and a test environment. Each company must be able to prove compliance. Separation of duties: whoever builds the solution should not certify it.
Scope, exclusions, regional rules. Powers of attorney, contracts with platforms. Late-payment law, data protection.
Conformity audit and private certification (e.g. LCC-SPFE: 40 controls). Annual review and expert reports.
Design, build and run the SAP solution. Provide the evidence auditors need.
Key Dates
Order HAC/1028/2026 in force; the deadlines start to run
SPFE available, at least two months before the first obligations
E-invoicing and payment reporting, turnover > €8M; copy and interconnection duties for private platforms
All other companies; SME payment reporting; end of the companion PDF
It is also the deadline for public-contract subcontractors to move from the FACeB2B registry to the new system.
Payment reporting, individuals ≤ €8M
EU ViDA cross-border reporting
Turnover is measured as the volume of operations under the VAT law in the previous calendar year. Dates are computed from the order's entry into force and the royal decree's transitional provisions; confirm your own position with your tax adviser.
Next Steps
Diagnose & decide
Companies and their turnover band, systems that bill, and the route per company: platform, direct or hybrid.
Design & prototype with the AEAT environment
Spanish profile mapped to tax codes and documents; status and payment flows; numbering across systems.
Build, test, interim audit
SAP configuration and connectivity; tests against the AEAT's specifications and with your largest partners.
Certify & go live
End-to-end tests once the SPFE is available; cutover, training and evidence pack.
Operate & monitor
Daily monitoring, payment reporting, legal updates, and the receiving side for everyone.
Obliged only in 2028? Your large suppliers start issuing e-invoices on 6 October 2027, with a PDF for the first year unless you accept the e-invoice alone. Being ready a year early to receive invoices as data and report payments is the cheapest way to prepare for your own date.
Above €8M? For the first 12 months, until 6 October 2028, each e-invoice must come with a readable PDF, unless the customer expressly agrees to receive it in its original format only. The PDF travels by any channel, never to the SPFE.
A Ten-Question Health Check
- Do we know each Spanish company's turnover band, and therefore its date?
- Have we listed every system that issues invoices in Spain, SAP or not?
- Have we chosen a route (platform, direct or hybrid) per company?
- Is invoice numbering unique across all those systems?
- Are customer and supplier tax IDs validated and complete?
- Can we receive supplier e-invoices as data from October 2027?
- Can the payment run produce the full payment date for every invoice within four days?
- Who will watch rejections and statuses every day?
- Where will we archive invoices, receipts and statuses, since the SPFE does not?
- Have we confirmed SAP's delivery for our release?
Three or more 'no' answers? Our DRC readiness scorecard extends this check to fifty statements across ten dimensions, from obligations to change readiness, with a score out of 100 and the red flags to fix first.
Mandate information summarised from the dossier "La Solución Pública de Factura Electrónica, explicada tras el seminario de la AEAT del 10 de septiembre de 2026" by Luis Vilanova, CISA — CEO & Lead Auditor, Legal & Digital Auditors, SL (www.leycreaycrece.com). Full credit to the author for the regulatory analysis and the LCC-SPFE framework. SAP content based on SAP DRC documentation and training material; the SAP impact and service sections are 30 Advisory's own.
Updated with Order HAC/1028/2026 (BOE No. 247, 5 October 2026), in force since 6 October 2026. The application dates run from that day, as Royal Decree 238/2026 provides. Information only — not legal or tax advice. 30 Advisory accepts no liability for decisions taken on the basis of this document.
Not Sure What This Means for Your SAP Landscape?
We'll map your turnover, connection route and S/4HANA roadmap against the Crea y Crece mandate in our free 60-minute diagnostic.
Three things to check first
- Which entities are above €8M turnover: they have 12 months from 6 October 2026.
- Your connection route: a private platform, the AEAT public solution, or both.
- Tax IDs and tax codes in master data: that is where most rejections start.
Want the full picture? Score your DRC readiness →