EN

What your software must do for VeriFactu: the requirements, one by one

This guide covers Spanish regulations.

A guide for reading a sales pitch with a critical eye. Each requirement, the article it comes from and how to check whether your software really meets it or only lists it in the brochure.

There is no such thing as “software approved by the Spanish tax authorities”. The Agencia Tributaria (Spanish Tax Agency) does not certify anything in advance. What the law requires is a declaración responsable (statement of compliance) from the manufacturer, for each version. It is the first thing to ask for, and the last thing shown by anyone who doesn't have one.

Where the requirements come from

From two pieces of legislation that have to be read together. Real Decreto 1007/2023 (Royal Decree) approves the Reglamento (the Regulation) and says what must be guaranteed; Orden HAC/1177/2024 (Ministerial Order) goes into the detail and says how: formats, algorithms, millimetres. Everything below comes from there.

1. The six adjectives of Article 8

Article 8 is the backbone. It requires the system to guarantee the integrity, preservation, accessibility, legibility, traceability and unalterability of the invoicing records. It sounds like a statement of intent, but paragraph 2 makes it concrete, and that is where it bites:

How to check: ask for a demo of what happens when you try to correct an invoice that has already been issued. If the program lets you edit it and save, it does not comply. It should take you to a corrective invoice or a cancellation.

2. The issuance record: when it is created and what it contains

Article 9 sets the moment: the registro de facturación de alta (invoice issuance record) is generated at the same time as, or immediately before, each invoice is issued. It is not an overnight batch job or a button someone presses at the end of the month.

Article 10 lists its content: tax ID of the issuer and of the recipient, number and series, dates, invoice type, breakdown of tax bases and tax amounts, the hash of the previous record, the identification of the invoicing system that generates it and the timestamp, among others. Eighteen items in all, lettered a) to q) (the Spanish alphabet includes ñ).

How to check: ask whether the record is created within the same transaction as the invoice. If the invoice can end up issued while the record fails separately, you have a gap: two different truths about the same document.

3. The hash: SHA-256 and the chain

Article 12 of the Regulation requires a hash (huella) to be added to issuance and cancellation records. Orden HAC/1177/2024, in its Article 13, specifies exactly which fields go into the calculation for each type of record, and its annex allows only one algorithm: SHA-256.

Each record includes part of the hash of the one before it. That builds a chain: if someone tampered with a record in the middle, every later hash would stop matching. It is the mechanism that makes the unalterability required by Article 8 verifiable.

How to check: ask whether the system has a function to verify the integrity of the whole chain and what it does if it detects a break. A program that calculates hashes but never checks them will give you the bad news on the day of the tax inspection, not before.

4. The cancellation record

Article 11 governs the registro de facturación de anulación (invoice cancellation record), generated when an invoice has been issued in error. It is important to understand what it is not: it does not delete anything. It adds a record documenting the cancellation, and the original remains.

How to check: see whether the program distinguishes between cancelling (the invoice should never have existed) and correcting (the amount or the details were different). They are not the same thing and are not handled the same way.

5. The event log

Less well known, and often only half quoted. Article 8.3 requires the system to have an event log (registro de eventos) that automatically records certain interactions and operations, without the user being able to intervene. The idea is to leave a trail of what happens around the invoicing records — start-ups, configuration changes, incidents — and not just of the invoices.

How to check: ask to see that log. It must exist as such within the system, and not be the server's technical log that the supplier looks at whenever they feel like it.

6. The two modes: submit or sign

Article 15 opens the door to submitting the records voluntarily, and Article 16 defines what a VERI*FACTU system is: one that submits them “continuously, securely, correctly, completely, automatically, consecutively, instantly and reliably”. The choice has consequences:

VERI*FACTU mode Non-verifiable mode
Submission to the AEAT Automatic and immediate, for every record Not submitted
Electronic signature Not required for the records Mandatory
Wording on the invoice QR code and the wording “Factura verificable en la sede electrónica de la AEAT” (invoice verifiable on the AEAT's online portal) or “VERI*FACTU” Only the QR code, with no wording
Record-keeping burden Lower: the AEAT already has the records Higher: keeping them and making them available to the authorities

For most small and medium-sized businesses, VERI*FACTU is the less complex option: you swap the burden of signing and safekeeping for the burden of staying connected.

7. The QR code and the wording on the invoice

The Order goes down to the millimetre. Its Article 21 requires a QR code measuring between 30 and 40 millimetres a side, compliant with the ISO/IEC 18004 standard, containing the issuer's NIF (Spanish tax ID), the invoice number, the date and the amount. And if the system is a VERI*FACTU one, Article 20 adds the wording “Factura verificable en la sede electrónica de la AEAT” or “VERI*FACTU”; in non-verifiable mode, the invoice carries only the QR code.

How to check: issue a test invoice and scan the QR code with your phone. It should take you to the Agencia Tributaria's verification service. And watch out for a detail that is easy to miss: if the system is working in the test environment, the QR code has to point to the test environment, not to the live portal, where that invoice does not exist.

8. The statement of compliance

Article 13 of the Regulation requires the software producer to issue a declaración responsable certifying that the system complies with Article 29.2.j) of the Ley General Tributaria (General Tax Act) and with the Regulation itself. It must appear in writing and visibly in the invoicing system itself, in each of its versions, and be provided to customers and resellers.

Two practical consequences that hardly anyone mentions:

What the law doesn't say but shows in production

So much for the letter of the law. These four points don't come from the BOE (Spain's Official State Gazette); they come from having the system up and running:

  1. Retrying submissions. The Agencia Tributaria's portal has outages and maintenance windows. If a network failure stops your invoicing, the problem lies in the design, not with the AEAT. The record has already been generated and chained; the submission must retry on its own, with the status of each one visible.
  2. The mode is frozen in the invoice. What matters is how the document was issued, not how the system happens to be configured on the day someone reprints it. If the wording on the PDF is worked out on the fly, a future reprint can contradict the original invoice.
  3. A real test environment. Before invoicing for real, you need to be able to rehearse against the AEAT's test environment, with its own verification URL.
  4. Several companies, several chains. If you invoice from more than one company, each one needs its own numbering, its own certificate and its own hash chain, kept separate. We cover this in VeriFactu in a transport company.

Ten questions for your supplier

  1. Can you show me the statement of compliance for the version I have signed up for?
  2. Which mode does the system work in, VERI*FACTU or non-verifiable?
  3. Is the issuance record generated in the same transaction as the invoice?
  4. Can I verify the hash chain from within the program?
  5. What exactly happens if I try to modify an invoice that has already been issued?
  6. Does it distinguish a cancellation from a corrective invoice?
  7. Where can I see the event log?
  8. What happens if the AEAT doesn't respond? Does it retry on its own? Can I see it?
  9. If I invoice from two companies, does each have its own series and its own certificate?
  10. If I move into the SII next year, what do I need to change?
Giormo answers all ten: a system used exclusively in VERI*FACTU mode (ready now; we switch it on with you, company by company), issuance and cancellation records with a chained SHA-256 hash, chain verification, automatic retrying of submissions and a statement of compliance per version, viewable from within the system itself. See the invoicing module.

Official sources

  • Real Decreto 1007/2023, of 5 December — Articles 8 to 16 (BOE-A-2023-24840). boe.es
  • Orden HAC/1177/2024, of 17 October — technical specifications, hash and QR code (BOE-A-2024-22138). boe.es
  • Ley 58/2003, General Tributaria (General Tax Act) — Articles 29.2.j) and 201 bis. boe.es
  • Agencia Tributaria — Sistemas Informáticos de Facturación (invoicing systems) and statement of compliance. sede.agenciatributaria.gob.es

Frequently asked questions

How do I know if my invoicing software complies with VeriFactu?
Ask your supplier for the declaración responsable (statement of compliance) for the specific version you are using. Article 13 of the Regulation requires the software producer to issue one for each version and to make it appear in writing and visibly in the system itself. If it exists, they can give it to you; if they reply with a generic certificate or a marketing seal, that is not what the law asks for.
Which hash algorithm does VeriFactu require?
SHA-256. It is the only hash type allowed by the annex to Orden HAC/1177/2024, whose Article 13 also specifies exactly which data go into the calculation depending on whether it is an issuance or a cancellation record. Each record includes part of the hash of the previous record, so the chain makes it possible to verify the sequence from the first record to the last.
What is the event log and who must have one?
It is a log that the system must generate automatically, recording certain interactions and operations without any user intervention. Article 8.3 of the Regulation requires it for invoicing systems, and its purpose is to leave a trail of what happens around the invoicing records, not just of the invoices themselves.
What happens if the Agencia Tributaria doesn't respond when a record is sent?
The invoicing record was already generated and chained when the invoice was issued, so invoicing must not stop. What should happen is that the system retries the submission on its own and keeps track of the status of each record. It is a design requirement that the law doesn't spell out, but it makes a big difference in production.

Want to put these ten questions to your current software?

Tell us what you invoice with today and where you stand. If your software complies, we'll tell you; and if ours is the one that doesn't fit, we'll tell you that too.

or email us at info@giormo.com