Mandatory B2B electronic invoicing in Spain: a complete guide for companies and the self-employed

Before long, many companies and self-employed professionals in Spain will face a major regulatory change: mandatory B2B electronic invoicing.

Let’s look at it in detail.

What is B2B electronic invoicing?

A B2B electronic invoice is an invoice that must be sent in a structured electronic format (not as a PDF), and doing so is mandatory between companies or self-employed professionals and other businesses.

This new way of invoicing also introduces a fundamental change: it is no longer only invoices that are exchanged — you must also report their status (accepted, rejected, paid and so on).

So far, this format is only mandatory for companies and self-employed professionals working with public administration, but that will change from July 2027.

Electronic invoicing in Spain is nothing new. Its regulation began in 2013 with Act 25/2013 of 27 December, which established the obligation to issue electronic invoices in dealings with public administration. Since then, self-employed professionals and companies working with the public sector have been familiar with the system.

For years, however, there was no equivalent regulation for the private sector. That gap was filled in 2022 with the approval of the Crea y Crece Act. Among its most significant measures, this law introduces the future obligation to use electronic invoicing in transactions between companies and self-employed professionals (B2B).

Although the law came into force on 29 September 2022, not all of its measures apply immediately. In the case of electronic invoicing, implementation depends on subsequent implementing regulations.

Those regulations arrived with Royal Decree 238/2026, approved in March 2026, which defines how the system will work in practice. The decree introduces a phased adaptation timetable, although it does not set fixed calendar dates.

Who will have to use B2B electronic invoicing?

The Crea y Crece Act states literally that “all companies and self-employed professionals — without exception — must issue and send electronic invoices in their commercial dealings with other companies and self-employed professionals”, and with the subsequent development through Royal Decree 238/2026 this obligation is spelled out further. There are, however, some cases where compliance is not mandatory:

  • Transactions with recipients not established in Spain, that is, where the customer has neither a place of business nor a permanent establishment on Spanish territory.
  • Sector-specific adaptations: the regulation allows the administration to make adjustments in certain economic sectors, depending on how they operate, but this has not yet been defined.

Royal Decree 238/2026 does not set out a closed list of exceptions as such; it defines the general framework and leaves some aspects subject to later development.

When will electronic invoicing between companies become mandatory?

Although B2B electronic invoicing is already regulated in Spain, it is not yet mandatory in practice. That is because its application depends on a key step that is still pending: the publication of a Ministerial Order that will develop the public invoicing solution.

Royal Decree 238/2026 sets out the adaptation deadlines, but these are not fixed dates: they are relative periods that start counting from the entry into force of that Ministerial Order. Once the system is officially activated:

  • Companies with turnover above 8 million euros will have 12 months to adapt
  • Self-employed professionals and small businesses will have 24 months to comply

Broadly speaking, current forecasts put the obligation in 2027 for large companies and in 2028 for small businesses and the self-employed

There is still some room, but the sensible thing is to start preparing as soon as possible, since adapting involves technical and operational changes to invoicing systems.

What format will invoices have to be in?

Under the new regulation, sending invoices as PDFs will no longer be enough.

Companies will have to use a structured electronic format, designed so that computer systems can process it automatically.

This allows invoicing programs to identify data such as the amount, the VAT or the customer with no manual intervention.

European regulations establish a common model (EN16931) and allow several technical formats, such as UBL or Facturae, though UBL will play a key role in the system, as it will be mandatory in certain cases, such as sending information to the administration.

The big change: traceability

If there is one thing that really makes a difference under the new regulation, it is not just the format of the invoice, but the control over what happens after it is issued.

Until now, once the invoice was sent, chasing payment depended almost entirely on internal processes: emails, phone calls and so on. With B2B electronic invoicing this changes, because from now on issuing the invoice will not be enough: the recipient will be obliged to report its status, at least at two key moments:

  • Whether the invoice has been accepted or rejected, along with the corresponding date.
  • When payment is made.

That information will also have to be reported to the administration.

How to adapt to this regulation

Although its entry into force does not yet have an exact date, as we have seen, the direction is clear: more automation, more control and fewer manual processes.

The best thing companies and self-employed professionals can do is start adapting as soon as possible. To do so, they can either use the tax authority’s public solution or use invoicing software that meets the new legal requirements, such as R2 Docuo.

Our software lets you issue invoices in the right format and without errors, report their status automatically to the administration, keep them all stored in a single secure place, and more. Take a look.