7 minute read

Sending Electronic Invoices in Spain Using the FacturaE Format via the FACeB2B System

The current state of e-invoicing in Spain

Spain has introduced obligatory e-invoicing to public administrations already in 2015. This was done to promote the spread and distribution of e-invoicing, and to improve the exchange of invoices between government institutions and companies.

Invoices need to be transmitted in a specific format using an electronic signature. The transmission is done using a platform called FACe (“Punto General de Entrada de Facturas Electrónicas” which translates to “General Entrance for Electronic Invoices”). In 2018, following legislation 9/2017, which also implements the EU regulations 2014/23/EU and 2014/24/EU, the platform was extended for B2B invoicing under the name FACeB2B. Companies who are working for the administration on behalf of other firms and who issue invoices over 5,000 € are already obligated to use the platform. Other Spanish companies have the possibility to use FACeB2B voluntarily. This is meant to provide increased security and traceability of electronic invoices.

White Paper - E-invoicing in Europe

What does a Spanish E-invoice look like?

The format that is used is FacturaE – an XML-based invoice format. Resources on the format, e.g. sample invoices, are provided by the Spanish Administration. The following image shows an extract from a FacturaE-Invoice.

Extract of a sample invoice in the FacturaE format (click to enlarge
Extract of a sample invoice in the FacturaE format (click to enlarge

An invoice is only valid if it complies with the FacturaE requirements and if it contains all mandatory information. The following data fields are of specific importance: corporate name, tax identification number and summonable address. A description of the fields and which data is needed, can be found in the following document.

For the visualisation and validation of an invoice, the Spanish Government has provided useful online tools, which help support companies with the implementation.

What is FACeB2B?

Through the integration with their ERP system, companies are able to automate receiving and distributing invoices with FACeB2B.

Official web presence of FACeB2B
Official web presence of FACeB2B

Unlike FACe, which is for sending e-invoices to public administrations, FACeB2B does not provide a portal that allows the upload of documents. Instead it provides a web service which can be used by companies for a variety of functions, including:

  • Send invoices
  • Fetch invoice information
  • Cancel invoices
  • Download invoices
  • etc.

From a technical perspective this also means that companies need to integrate the web service into their back end software, typically their ERP software. Instead of performing a direct integration, most companies choose a specialised service provider who enables the integration of the ERP system with the web service. Thereby, the commissioning company does not need any internal programming.

After the integration with the enterprise software is completed, a seamless exchange of invoice data with the Spanish web service is possible.

How can I send invoices over FACeB2B?

The usage of FACeB2B is not mandatory. If a company decides to use it, there are certain organisational and technical steps involved.

Registering for FACeB2B

If a company wants to use FACeB2B, it needs to register first. Doing that requires a DIRe code. This code is unique for every company and allows for its automatic identification within the system. It is obtainable by registering with the Directorio de Entidades (DIRe). Different from FACe, a service provider should be hired to make use of all the advantages that FACeB2B offers. The provider also needs to be registered on the DIRe and FACeB2B. Additionally, the hiring company also needs to authorise their service provider during their registration as its so-called ESF (Empresa de Servicios de Facturación).

Invoice requirements

All invoices need to be compliant with the FacturaE format. At the moment it is not necessary for B2B users to sign their invoices electronically. In the future this could be subject to change, making it important for companies to stay informed regarding electronic signatures. Information of the current state, and the documents that describe it can be found on the website of the Spanish authority.

Generating invoices

Typically, it is only possible to export invoices from an ERP system like SAP or Microsoft Dynamics NAV in one specific format. It is therefore necessary to convert these documents into a valid FacturaE format in a consecutive step. The same applies to the other direction: if a company receives invoices, they need to be translated from the FacturaE format into a valid ERP format in order to be read and processed.

For the creation of FacturaE invoices and the transmission to the FACeB2B web service it is recommended to utilise the experience and know-how of a specialised EDI provider.

Transmission of E-invoices with the help of a provider

The following image shows how an e-invoice can be transmitted over FACeB2B using a provider like ecosio.

Invoice transmission to the FACeB2B platform
Invoice transmission to the FACeB2B platform

Invoices are being exported from the ERP system in a standard way – in the case of using SAP it could be the INVOIC02 IDoc format. The file is sent from the SAP system to ecosio, where it is being converted into a valid FacturaE document. As previously mentioned, it is required that all mandatory data is available in the source.

After a successful conversion, ecosio sends the document to FACeB2B. Now the invoice recipient only needs to pick up the invoice from the portal. Please note that this only works if the recipient is registered on the platform. It is possible to get this information via the FACeB2B website by entering the DIRe code of the recipient and checking its availability. After the e-invoice is accepted, the status will be forwarded to the ERP system by ecosio. Thus, the sender of an invoice has full transparency of whether the invoice recipient has received the invoice or not. This information does not need to be retrieved from an external system, but can be viewed directly in the ERP system. In case of an SAP system this means that the IDoc status changes (e.g. to status 41 – application document created in target system).

If a company is acting as an invoice recipient, the process is similar. As soon as a new invoice has arrived at FACeB2B, it will be picked up by ecosio and translated into a format that is supported by the ERP system. After the document is sent to the company, the status is also exchanged via the web service, so the invoice issuer stays informed about the process.

By involving a service provider, the company saves the technical implementation effort of the FacturaE and FACeB2B and only needs to make sure that all mandatory invoice data is available in the ERP system.


Companies with a registered office in Spain (this includes subsidiaries of enterprises from abroad) need to stay informed about the local developments of e-invoicing initiatives. At the moment it is unclear how and when the legislation plans to make FACeB2B invoicing a mandatory requirement for all companies. Companies involved early in this topic will be able to react faster to changes of invoicing regulations and execute the necessary steps with the help of a service provider.


Do you have any further questions about the transmission/exchange of electronic Invoices in Spain using FACeB2B? Feel free to contact us or use our chat, we would love to help you!

Are you aware of our free XML/Peppol document validator?

To help those in need of a simple and easy way to validate formats and file types, from CII (Cross-Industry Invoice) to UBL, we’ve created a free online validator. To try it out yourself just click here.


SAP ERP and SAP S/4HANA are the trademarks or registered trademarks of SAP SE or its affiliates in Germany and in several other countries. 


most read

Keep on reading

4 minute read

Peppol in Singapore

Looking to exchange documents with partners in accordance with Singapore's Peppol regulations? Learn more about Peppol in Singapore here!

5 minute read

Sistema di Interscambio (SdI) Reporting to Replace Esterometro Declarations in 2022

From 2022 all Italian businesses must use Sistema di Interscambio (SdI) instead of Esterometro declarations for cross-border tax reporting.

4 minute read

What is a Peppol Access Point?... and other Peppol connection FAQs

What is a Peppol Access Point, why do you need one, how do you find one... and other key Peppol connection questions answered.

3 minute read

ecosio at The E-invoicing Exchange Summit Vienna

ecosio will be exhibiting at the 2021 E-invoicing Exchange Summit. Find out what's in store and how you can join us!

7 minute read

What is Peppol?

Usage of Peppol is growing fast across Europe and beyond. But what is Peppol, how does Peppol work, and what advantages does it offer?

6 minute read

Seven Things to Consider When Selecting a Peppol Access Point

Need help selecting a Peppol Access Point or planning on becoming one yourself? Read our article to find out what both processes involve.

8 minute read

Peppol Message Responses - A Helpful Guide

Peppol acknowledgements, message level responses and business level responses are a key part of what makes Peppol such an attractive prospect for modern B2B data exchange. Find out how they...

7 minute read

E-invoicing in Poland

Big changes are planned for e-invoicing in Poland over the next few years. Find out what's ahead and how long you have to implement changes.

5 minute read

E-invoicing in Spain

What are the regulations when it comes to e-invoicing in Spain? Find out what's required and what changes are likely in the future.

5 minute read

E-invoicing in France

Is e-invoicing in France mandatory? Read our article to find out what you need to do to achieve compliance and prepare for the future.

3 minute read

Three Tips to Help You Improve E-invoicing Processes

Three simple things you can do to improve your business's e-invoicing processes and ensure they are reliable and future-proof.

7 minute read

The Benefits of E-invoicing - An Introduction

Find out more about why a growing number of businesses are turning to automation and what the benefits of e-invoicing are.

We use cookies to provide an optimal website experience. You decide which one you want to allow. Depending on the setting, however, not all functionalities may be available to you. Data protection & imprint.