Blog Layout

SII in Spain: What is it, why does your company need to comply, and how to do it?

Jul 14, 2023

SII in Spain: What is it, why does your company need to comply, and how to do it?


 

The Immediate Supply of Information (SII) system is a mandatory tax reporting obligation implemented by the Spanish Tax Authority (AEAT) for certain companies. This system requires affected taxpayers to submit electronic records of their VAT invoices and other accounting records to the AEAT on a real-time or near real-time basis. In this blog post, we will explain what SII is, why companies need to comply, and how to do so.

 

What is SII?

 

SII is a new VAT management system implemented by the AEAT. The goal of SII is to improve the accuracy and efficiency of tax reporting and reduce the risk of VAT fraud. SII requires certain taxpayers to submit electronic records of their VAT invoices and other accounting records to the AEAT on a real-time or near real-time basis, typically within 4 days of issuing or receiving the invoice.

 

Who needs to comply with SII?

 

SII applies to companies in Spain that exceed certain revenue and transaction thresholds or are part of certain industries. Please check the official Spanish Tax authority website to know the rules.

 

Why do companies need to comply with SII?

 

Companies that are required to comply with SII must do so to avoid potential penalties and fines.

 

How to comply with SII?

 

To comply with SII, companies must maintain electronic records of their VAT invoices and other accounting records and submit them to the AEAT on a real-time or near real-time basis. Companies can choose to use their own in-house software or third-party software to generate and submit the electronic records.

 

How to integrate with SII?

 

To do so it is mandatory for the company to request a certificate to the Spanish Authority. The certificate will be use to authenticate the API call. Once you acquire the certificate, if you intend to contact the SII portal your self, you will need to export the cert and key from .pfx or .p12 file. For that openssl will be your best friend:

 

openssl pkcs12 -in spain_sii.pfx -clcerts -nokeys -out spain_sii_mycert.pem -password pass:"xxxx"

openssl pkcs12 -in spain_sii.pfx -nocerts -nodes -out spain_sii_mykey.pem -password pass:"xxxx"

 

Once you have the two files, you will need to copy paste the content into a unique file in order to create the bundle .pem that will then be used to authenticate on the API. The bundle should look like:


-----BEGIN CERTIFICATE-----

MIIGmjCCBYKgAwIBAgIQFciYgGKGJNVYbjZryy+ggSjAgEAAoIBAQCBAQsFADBLOLjR

...

Z2orfXHJGDmKgAwIzf7eGfC4r0g4=

----- END CERTIFICATE-----

----- BEGIN PRIVATE KEY-----

MIIEvQICBYKgAwIBAgIQFciYgBAQEFAASCBKcwggSjAgEAAoIBAQCZBqn8nYbmOLjR

...

Z2orfXHJGDKgAwImzf7eGfC4r0g4=

----- END PRIVATE KEY-----


 

All the information about the XML format required for each process can be find here: Tax Agency:Technical Frequently Asked Questions - General Issues (agenciatributaria.gob.es)

 

Once you have the certificate and the XML document to be sent, the API endpoint to use will depend on the process:

 

Web Service Name Description Endpoint
Invoice client This web service is provided by the AEAT. It is used to send information about issued invoices, and sends a response containing information about invoice processing on the SII system side. /wlpl/SSII-FACT/ws/fe/SiiFactFEV1SOAP
Invoice of supplier This web service is provided by the AEAT. It is used to send information about received invoices, and sends a response containing information about invoice processing on the SII system side. /wlpl/SSII-FACT/ws/fr/SiiFactFRV1SOAP
Intra-community This web service is provided by the AEAT. It is used to send information about intra-community invoices and sends a response containing information about invoice processing on the SII system side. /wlpl/SSII-FACT/ws/oi/SiiFactOIV1SOAP
Payment of client This web service is provided by the AEAT. It is used to send information about customer payments for specific invoice types and sends a response containing information about processing on the SII system side. /wlpl/SSII-FACT/ws/fe/SiiFactCOBV1SOAP
Payment of supplier. This web service is provided by the AEAT. It is used to send information about payments to suppliers for specific invoice types and sends a response containing information about processing on the SII side of the SII system. /wlpl/SSII-FACT/ws/fr/SiiFactPAGV1SOAP
Collection In Cash This web service is provided by the AEAT. It is used to send information about customer cash payment transactions and sends a response containing information about processing on the SII system side. /wlpl/SSII-FACT/ws/pm/SiiFactCMV1SOAP

The test prefix being: https://prewww1.aeat.es

 

The prod prefix being: https://www1.agenciatributaria.gob.es

 

 

The return messages from SII are very clear. In case of error, the error message will point you in the good direction. Most of the time it's an XML format issue or wrong data submitted.

 

We have integrated couple of client since beginning of 2023, the SII platform is very stable. Most of our challenge are due to the certificate and certificate renewal.

 

As usual, we have added this bot to our library, and it is available for our customers.

 

If you have any question or want to know more, feel free to contact us! 

 

Integrating VIES VAT Validation with your ERP
By flabouch 19 May, 2022
How to integrate and automate VIES VAT number validation of EU commission with your ERP.
SAP Idoc parser python library
By flabouch 12 May, 2022
SAP Idoc parser in Python
Trading partner integration
By flabouch 30 Apr, 2022
Business partner integration can be challenging, due to different technology on both side and most likely due to business process difference and non-flexibility.
Share by: