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.
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.
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.
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
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).
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.
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.
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.
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.
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.