Skip to content
↑ SPAIN
Summary
What the law says
Timeline
Technical details (B2G)
Technical details (B2B)
Basque Country
Tax Fraud Prevention
Our advice
Get your project implemented
↓ Bottom
Spain flag

Last update: 2024, March 14

B2G E-Invoicing


Mandatory since 2015
(except in Basque Country)

Central platform “FACe” + “FacturaE” file format in most cases, but many exceptions exist due to the high level of autonomy of Spanish regions.

B2B E-Invoicing


Currently allowed using EDI, e-signature or guaranteeing a complete audit trail

Will become mandatory in multiple
file formats via a central platform or
certified service providers in 2025 at best, 
but no clear timeline available yet.

What the Law Says

B2G E-Invoicing

B2G e-invoicing has been mandatory in Spain since January 1, 2015. All suppliers to public entities are required to issue invoices electronically.

To facilitate things, one central platform called “FACe” is available, and companies should exchange invoices in the standardized “FacturaE” file format, along with a digital signature.

However Spain, although not officially a federal country, still allows a lot of autonomy to its regions.

Consequently, the use of FACe & the Facturae file format is only mandatory for central administrations, not for local administrations. Fortunately, all Spanish regions except Basque Country decided to also use FACe and the Facturae file format, but still, some local administrations may not be reachable through FACe.

Additionally, the Basque Country decided to implement its own platform “Ticket BAI” and their own file format “TBAI”, also based on XML. And within the Basque Country itself, few things may also differ for each of its 3 provinces, such as the B2G mandate timeline.

Finally, invoices must be archived for 6 years.

B2B E-Invoicing

No B2B mandate has been issued yet, but in September 2022, the law “Crea y Crece” (“create & grow”) was published, and it included B2B e-invoicing becoming mandatory country-wide.

A phased roll-out spanning (large companies first, rest of the companies one year later) was initially planned in 2024 and 2025, but the mandate was postponed. As the project is still in the legislative process, there is no timeline available yet.

In the meantime, a central platform (called “FACeB2B”) based on the existing B2G platform FACe is available since 2018, and companies can already use it to exchange their invoices in FacturaE format. The central platform is intended for subcontractors of public suppliers.

Otherwise, businesses can still transmit invoices in the following ways:

  • Paper-based invoices
  • PDF invoices with e-signature or complete audit trail
  • EDI
And same as for B2G, invoices must be archived for 6 years.

Timeline

B2G E-Invoicing Becomes Mandatory
B2G e-invoicing is mandatory for all companies sending invoices to public administrations using the FACe central platform and the FacturaE format.
B2B Central Platform Available
In addition to more traditional ways to exchange invoices (EDI, signed PDF, paper, ...), a central platform has been released by the Spanish government for B2B transactions.
New Law About B2B E-Invoicing
Law "Crea y Crece" published, introducing a phased roll-out of mandatory B2B e-invoicing, planned for 2024-2025
Precisions About the B2B Mandate
The B2B e-invoicing mandate will follow the French model of a Y-Scheme, allowing to exchange e-invoices either via the central platform FACeB2B or via certified service providers
B2B E-Invoicing Becomes Mandatory
Given that there's no clear timeline available yet, the B2B e-invoicing mandate is not likely to be implemented before 2025 at best
2015
2018
Sept 28, 2022
June 15, 2023
2025 at best

Advertisement

Resources

Public entity supervising the e-invoicing mandates in Spain

Spain B2G central platform

Spain current B2B central platform

Official directory of Spanish businesses

List of private service providers officially verified by the FACe portal

Technical specifications of the FacturaE format

Technical Details (B2G)

In all Spanish regions beside the Basque Country, private businesses must use the central platform called “FACe” (which unintuitively corresponds to “Punto General de Entrada de Facturas Electrónica”), and send their invoices in the FacturaE format (based on XML) to the Spanish public administrations.

Additionnally, the FacturaE e-invoices must be digitally signed using a XAdES signature.

Finally, each invoice must be properly addressed to the corresponding public entity (the invoice recipient) by specifying its DIR3 code. The DIR3 code can be found on the DIRe online directory and is a combination of 3 unique identifiers supervised by the Common Directory of Organizational Units and Office :

  • The identifier of the Oficina Contable (Accounting Office)
  • The identifier of the Órgano Gestor (Managing Office)
  • The identifier of the Unidad Tramitadora (Processing Unit)

However, the use of FACe is mandatory for the central government and optional for regional and local administrations, which means that some public entities may not be reachable directly through FACe. In that case, the invoice sender (the supplier of the public administration) should address the invoice to the “Administración General del Estado” (the central administration of the region) and specify the DIR3 code  of the targetted local administration.

Technical Details (B2B)

Current

There is no requirement regarding the way to transmit invoices. They can be issued the following ways:

  • Paper-based invoices
  • PDF invoices with e-signature or complete audit trail
  • EDI

A central platform (currently called “FACeB2B”) based on the existing B2G platform FACe is also available since 2018, and companies can already use it to exchange their invoices in FacturaE format This central platform is primarily intended for subcontractors of public suppliers. It uses a central directory service (Directorio de Entitades, DIRe) to find the invoicing parties using their tax identification number (NIF). The parties can either directly interface with the central platform using a public Web Service or choose a designated “Invoicing Service Provider” (Empresa de servicios de facturación, ESF). 

Invoices must then be stored 6 years.  

Upcoming B2B E-Invoicing Mandate

Following the publication of the “Crea y Crece” law in September 2022, we are waiting for the corresponding royal decree to be published, after which the B2B mandate will officially take effect, 12 months later for large companies and 24 months later for small & medium enterprises.

While those 2 steps were initially planned for Jan 1st, 2024 and Jan 1st, 2025, the royal decree is still not published to this day, making it unlikely for the B2B mandate to become effective before 2025 at best.

Spain has described a model similar to the French B2B mandate with a Y-Scheme, allowing private business to exchange invoices either through a central platform “SPFE” (Solución Pública de Facturación Electrónica) using the FacturaE format, or through certified service providers with a wider range of possible file formats: 

  • FacturaE (XML)
  • UBL
  • EDIFACT
  • CII (European Norm format)
Y-Scheme illustrating the upcoming Spanish B2B e-invoicing mandate
Spanish hypothetical Y-Scheme model
It means that businesses that were already using EDI to transmit invoices may be able to keep operating those EDI connections with only minor evolutions, as long as their current EDI service provider becomes certified by the administration. 

The certified service provider will ensure the exchange of invoices between the businesses while feeding the AEAT (Spanish tax authority) with all the required data via the the central platform. For businesses that will directly exchange invoices via the central platform, the E-Reporting to the AEAT will be done automatically by the central itself.

A significant enhancement over the French mandate involves mandating the invoice recipient to provide updates to the invoice sender regarding the status of each invoice at two critical stages of its lifecycle through the use of invoice responses:

  • Commercial acceptance or rejection of the invoice and the date of it
  • Complete payment of the invoice and the date of it

Of course, these invoices statuses will be also sent to the AEAT that will be actively monitor payment data and track late-payers.

Regarding the existing FACeB2B platform, it is not clear whether it will keep operating, and if it will be connected to the new SPFE central platform.

E-Invoicing in the Basque Country

Given its extended autonomy, the Basque Country region did not follow the same timeline as the rest of the country and opted for a different solution to implement its B2G & B2B e-invoicing mandates. 

There are many differences between what Spain did with FACe and what the Basque Country is currently implementing with its “TicketBAI” project. The main characteristic of this project is that there is no central platform, rather a certified compliant software directly connected to the tax authority that must be used to issue compliant TicketBAI invoices.

This certified software is designed to issue the following documents:

  • A TicketBAI XML file with all key elements about the invoice, which must be digitally signed using a XAdES signature and must contain proof of the invoice “chaining” (meaning that each XML has to identify the previous invoice to prove that there is no fraud)
  • The invoice itself, either in paper or electronic format
    • In both cases, the certified software must retrieve a unique TicketBAI invoice identifier to be applied on the invoice
    • If the invoice is generated in a non-electronic format, the certified software must append a QR code onto the invoice that will give access to the data contained in the XML and its digital signature

Additionally, the Basque Country has chosen to implement an e-invoicing mandate that covers both B2G & B2B transactions at the same time, and the region is divided into 3 provinces, each with its own mandate implementation timeline: Álava (2022), Gipuzkoa (2022-2023) and Bizkaia (2024-2025).

VAT Fraud Prevention: Veri*Factu

In addition to the upcoming B2B e-invoicing mandate, there is also an upcoming Anti-Fraud law that was revealed in December 2023: the Veri*Factu regulation.

This anti-fraud law aims to tackle VAT fraud by mandating the use of certified “Computerized Invoicing Systems” software called SIF (Sistemas Informáticos de Facturación). More specifically, Spanish businesses will have to generate their invoices using such certified SIF software. 

The goal of the SIF software is to generate those invoices with a high level of security and controls, and to transmit those invoices in real-time to the AEAT (Spanish tax authority). 

It is planned for the Veri*Factu requirements to become effective for all Spanish businesses on July 1st, 2025. Software editors are currently working to update their SIF solutions in order to comply with the law. 

Surprisingly, adhering to the upcoming B2B e-invoicing mandate and sending invoices to the Spanish central platform or a certified provider does not excuse Spanish businesses from also complying with the Veri*Factura regulation. They will end up effectively transmitting the same invoice data twice to the AEAT: once via their certified SIF software and once via the SPFE central platform or their e-invoicing certified provider.

Resources

Public entity supervising the e-invoicing mandates in Spain

Spain B2G central platform

Spain current B2B central platform

Official directory of Spanish businesses

List of private service providers officially verified by the FACe portal

Technical specifications of the FacturaE format

The Invoicing Hub Word

Spain is a complex country regarding electronic invoicing, due to the federal nature of its administrations.

While most B2G transactions can be addressed via the central platform FACe, some local administrations are not reachable and create complications. Similarly, a whole region – the Basque Country – has opted for a different format and a different platform.

Bolstered by this experience, Spain will likely follow the French B2B mandate Y-model to give its regions and private businesses more flexibility by allowing B2B transactions either via a central platform or via certified service providers.

Consequently, we shall see the same benefits & the same drawback:

+ Allow the existing EDI landscape to subsist
+ Avoid a big bang while nearing the deadlines
+ Give businesses (and regions) some latitude regarding the choice of the solution

 Creates a lot of complexity and navigating this environment can become a real challenge for companies

But surprisingly, the Veri*Factu obligations will at the same time force Spanish businesses to issue their invoices twice in separate tools, multiplying the efforts and the risks associated, while everything could have easily been covered by the new B2B mandate using one single system.

This simultaneity of requirements will bring even more complexity for businesses to operate in Spain, and will make it all the more crucial to implement the correct e-invoicing solution, able to manage the multiple law requirements and local specificities.

Female consultant providing explanations to a business executive on a whiteboard in the company's offices

Need the help of
The Invoicing Hub experts?

Get Your Project Implemented