W System / Blog / Spain B2B e-invoicing from 6 October 2027 for software
Spain B2B e-invoicing from 6 October 2027: what invoicing software must ship
In short: Spain's B2B e-invoicing deadlines are now fixed. Order HAC/1028/2026 entered into force on 6 October 2026, so under Royal Decree 238/2026 businesses with more than EUR 8 million volume of operations must issue and receive e-invoices from 6 October 2027, and everyone else from 6 October 2028. Invoices must follow EN 16931 in UBL, CII, EDIFACT or Facturae. Every invoice that does not go through the AEAT's free public solution needs a faithful copy in UBL sent to it at the moment of issue, and buyers must report rejection and full payment within four working days. This page is for invoicing, ERP and accounting software builders: timeline, formats, the copy, status reporting, a checklist and a live example.
Timeline
| Date | What changes | Source |
|---|---|---|
| 6 Oct 2026 | Order HAC/1028/2026 (BOE of 5 October 2026) enters into force. It regulates the AEAT's public e-invoicing solution and starts the clock for the deadlines in Law 18/2022 and Royal Decree 238/2026. | Order HAC/1028/2026, final provision |
| By early Aug 2027 | The public solution must be available at least two months before it first applies. | Order, second additional provision |
| 6 Oct 2027 | Businesses and professionals whose volume of operations exceeded EUR 8 million in the previous calendar year must issue and receive B2B e-invoices. From the same date private e-invoicing platforms must send faithful copies to the public solution, interconnect with each other and meet the platform requirements. | RD 238/2026, fourth final provision (1)(a) and (2) |
| 6 Oct 2027 – 5 Oct 2028 | Those large issuers must also send each e-invoice with a PDF that keeps it readable, unless the buyer expressly accepts the original format. The PDF goes to the buyer only, never to the public solution. | RD 238/2026, second transitional provision |
| 6 Oct 2028 | All other businesses and professionals, including the self-employed, must issue and receive B2B e-invoices. | RD 238/2026, fourth final provision (1)(b) |
| 6 Oct 2029 | Status reporting (acceptance or rejection, full payment) becomes mandatory for individuals and income-attribution entities with up to EUR 8 million turnover; voluntary for them until then. | RD 238/2026, third transitional provision |
Scope: a business or professional that must issue an invoice under Royal Decree 1619/2012 must issue it electronically when the customer is a business or professional with its seat, a permanent establishment or, failing that, its domicile in Spain (RD 238/2026, art. 3). Simplified invoices are excluded unless they are qualified simplified invoices (art. 4). Not tax advice; check the AEAT e-invoicing pages before you release.
Two routes: private platforms and the public solution
The Spanish system is the set of private e-invoice exchange platforms plus the AEAT's public solution, which also acts as the repository of all invoices (art. 5). A business can use either or both. A business that has not expressly agreed with its suppliers to receive through a private platform is treated as receiving through the public solution, and a business that does use a private platform must publish its entry point in its communications and on its website (art. 6). Platforms must offer a public lookup of the businesses that chose them, accept every interconnection request from another platform and make it work within one month (arts. 6, 8 and 9).
Formats and signature
- Syntaxes: EN 16931 in CII, UBL, EDIFACT or Facturae (art. 7.1). Private platforms must be able to convert between all of them. The decree's preamble accepts Peppol BIS on private platforms, since it is UBL following EN 16931.
- Public solution: UBL only, EN 16931 semantics, with the Spanish fields of Annex I of the Order (marked BT-ES and BG-ES), for example the copy indicator, the effective payment date, withholdings (retenciones) and the VERI*FACTU or TicketBAI QR reference. No embedded files (Order, art. 3.6).
- Signature: invoices issued through private platforms must carry an advanced electronic signature, by the issuer or by authorised delegated signing (art. 7.3).
- Between platforms: the format is what issuer and buyer agreed; the issuer's platform converts before signing. Without an agreement, the format of the public solution applies (art. 7.4).
- Unique code: each invoice is identified by the issuer's NIF, the series and number, and the issue date (art. 7.5; Order, art. 6). The public solution uses it to reject duplicates.
The faithful copy (copia fiel)
If you issue outside the public solution, your platform or system must send the public solution a faithful copy in UBL at the same time as the invoice is issued (art. 6.2; Order, art. 4). It must carry every item of the original that has a semantic equivalent in the public solution's syntax, at least the legal minimum content, and the copy indicator set to true. The AEAT validates syntax and semantics and answers with the accepted copies and the rejected ones with reasons. A rejected copy does not invalidate the invoice the buyer already received, but you must fix the cause and send it again; if the cause was an error in the original invoice, you issue a correct original and send its copy (Order, art. 5.6). If the public solution is down for more than 24 hours, you have four working days after it comes back (art. 5.7). When a third party or the buyer issues on your behalf (self-billing), their platform sends the copy.
Status and payment reporting
The buyer must tell the issuer about commercial acceptance or rejection and about full payment with its date, within four calendar days not counting Saturdays, Sundays and national holidays (art. 10). The buyer must also report full payment or rejection and the payment due date to the public solution within the same four days, whichever route the invoice took (art. 12); a buyer can let its platform do this. Without a rejection the invoice is presumed accepted. If the invoice itself carries a payment date on or before its issue date that matches the date of the operation (BT-ES-2, cac:PrepaidPayment/cbc:PaidDate), the buyer's payment report counts as done (Order, art. 7.4). The aim is to monitor payment periods under the late-payment law.
VERI*FACTU is a separate obligation
The invoicing-software rules of Royal Decree 1007/2023 (VERI*FACTU) are a different regime. Their legal dates are 1 January 2027 for corporate income taxpayers and 1 July 2027 for everyone else. On 5 October 2026 the Ministry of Finance announced it will move the pending obligations to October 2028 to match the e-invoicing date for smaller businesses; that change needs a new legal text. If an invoice comes from a VERI*FACTU or TicketBAI system, the public solution's format has a place for the QR reference.
Checklist for invoicing and ERP builders
- Find out which of your users had more than EUR 8 million volume of operations in the previous year: they start on 6 October 2027, the rest on 6 October 2028.
- Emit EN 16931 in at least one allowed syntax. UBL is the safe choice because the public solution and the faithful copy both use it.
- Decide per customer: integrate with the AEAT public solution yourself, or connect a private platform that sends the copy, signs and interconnects for you.
- Add the Spanish fields your users need: copy indicator, withholdings (IRPF retenciones), corrective-invoice codes, and the VERI*FACTU or TicketBAI reference where it applies.
- Build the unique code (issuer NIF + series and number + issue date) and stop duplicate numbers before they reach the AEAT.
- For large issuers, attach a readable PDF for the first 12 months unless the buyer has expressly accepted the XML alone.
- On the purchase side, record acceptance, rejection, payment date and due date, and report them within four working days.
- Store each customer's entry point (private platform or public solution) and show your own users' entry points on their invoices and website.
- Validate every invoice against EN 16931 before it leaves; a rejected copy means a second submission.
Example: create and check a Spanish EN 16931 invoice
Disclosure: W System, which publishes this page, makes the e-invoice API used below. The call creates a UBL invoice with the Peppol BIS Billing 3.0 structure for two placeholder Spanish companies (made-up NIFs) and checks it against EN 16931. It does not add the Spanish BT-ES fields, does not sign the file, does not send anything and does not talk to the AEAT; W System is not a Spanish e-invoicing platform. Use it to test your EN 16931 output before you hand it to the public solution or a platform. Not tax advice.
curl -X POST https://api.wsystem.dev/einvoice/create \
-H 'Content-Type: application/json' --data @invoice.json
invoice.json:
{
"format": "peppol-bis3",
"invoice_number": "2027-A-0001",
"issue_date": "2027-10-06",
"due_date": "2027-11-05",
"currency": "EUR",
"buyer_reference": "PO-7781",
"delivery_date": "2027-10-06",
"seller": {
"name": "Ejemplo Software SL",
"vat_id": "ESB12345674",
"street": "Calle de Alcalá 1",
"city": "Madrid",
"postal_code": "28014",
"country": "ES"
},
"buyer": {
"name": "Cliente Ejemplo SA",
"vat_id": "ESA87654323",
"street": "Passeig de Gràcia 2",
"city": "Barcelona",
"postal_code": "08007",
"country": "ES"
},
"lines": [
{
"description": "Software subscription, October 2027",
"quantity": 1,
"unit": "C62",
"unit_price": 1000,
"vat_rate": 21
}
],
"payment": {
"iban": "ES9121000418450200051332",
"terms": "30 days"
}
}
Real response from the live API on 21 October 2026 (the generated XML left out):
{
"valid": true,
"format": "peppol-bis3",
"syntax": "UBL 2.1",
"document_type": "ubl_inv",
"totals": {
"currency": "EUR",
"line_total": "1000.00",
"vat_total": "210.00",
"total_with_vat": "1210.00",
"payable": "1210.00"
},
"errors": [],
"warnings": [],
"checked": {
"xsd": true,
"EN16931": true,
"XRechnung": false,
"PeppolBIS3": false,
"SK_national": false,
"NO_national": false
},
"notes": [
"Built to the Peppol BIS Billing 3.0 structure and checked against EN 16931 only; Peppol-specific rules are not run yet."
],
"disclaimer": "Technical check against the official EN 16931 / XRechnung rule sets. A technically valid file is not tax or legal advice. Peppol BIS 3 specific rules (PEPPOL-EN16931-*) are not checked yet."
}
To check a file you already produce, post it to /einvoice/validate or drop it into the free e-invoice validator. GET /einvoice/route?id=ESB12345674 checks the VAT number in VIES, looks for the company in the public Peppol Directory (scheme 9920) and returns the Spanish rules row. Free for 20 calls a day per IP; details on the e-invoice API page.
Questions and answers
When does B2B e-invoicing become mandatory in Spain?
On 6 October 2027 for businesses and professionals whose volume of operations exceeded EUR 8 million in the previous calendar year, and on 6 October 2028 for everyone else. Royal Decree 238/2026 counts 12 and 24 months from the entry into force of Order HAC/1028/2026, which was published in the BOE on 5 October 2026 and entered into force on 6 October 2026.
Which formats are allowed for Spanish B2B e-invoices?
A structured message following the EN 16931 semantic model in CII, UBL, EDIFACT or Facturae. The preamble of Royal Decree 238/2026 says Peppol BIS messages are also valid on private platforms because they use UBL and follow EN 16931. The AEAT's public solution itself only works with UBL.
What is the faithful copy (copia fiel)?
If an invoice is not issued through the AEAT's public solution, the platform or system that issues it must send a faithful copy in UBL to the public solution at the same time as it is issued. The copy is marked with the copy indicator (BT-ES-1, cbc:CopyIndicator = true), may not embed other files, and is validated for syntax and semantics. A rejected copy has to be fixed and sent again; a duplicate is rejected.
Do buyers have to report anything?
Yes. The buyer must tell the issuer about commercial acceptance or rejection and about full payment with its date, and must report full payment or rejection, plus the payment due date, to the public solution. Both within four calendar days, not counting Saturdays, Sundays and national holidays. Without a rejection or a later corrective invoice the invoice is presumed accepted.
Are simplified invoices (tickets) included?
No. Operations documented with simplified invoices are excluded, unless they are qualified simplified invoices under article 7.2 of the invoicing regulation (Royal Decree 1619/2012).
Does VERI*FACTU still start in 2027?
The legal dates are 1 January 2027 for corporate income taxpayers and 1 July 2027 for everyone else. On 5 October 2026 the Ministry of Finance announced it will move the pending VERI*FACTU obligations to October 2028 to match the e-invoicing date for smaller businesses; that change needs a new legal text, and until it is published the 2027 dates stand.
Sources
- Order HAC/1028/2026 of 2 October on the public e-invoicing solution (BOE-A-2026-20587)
- Royal Decree 238/2026 of 25 March on mandatory B2B e-invoicing (BOE-A-2026-7295)
- AEAT: e-invoicing (SPFE)
- Ministry of Finance note of 5 October 2026 on the VERI*FACTU dates
- AEAT note on the current VERI*FACTU deadlines
Related
- EU e-invoice API: validate, create and route
- E-invoicing API for EU mandates
- France e-invoicing 2027 for SMEs
- Poland KSeF from 1 January 2027
- Norway e-invoicing from 1 January 2027
- Germany: BMF letter of 15 October 2026
Checked against the BOE texts of the Order and the Royal Decree, the AEAT pages and the Ministry of Finance note on 21 October 2026.
Facts checked 2026-10-21. W System is the maker of this product. Not affiliated with the European Commission. Not legal or tax advice.