Blog · Invoicing

Verifactu explained from inside our own ERP: what it requires, when and how we built it

By Pedro Mulero Sánchez, CEO and founder of Tarraco App Lab · 15/10/2026 · 8 min read

Verifactu has been explained a lot, almost always from the outside. We had to build it into the Tarraco App Lab ERP, so here it is from the inside: what the rules require, which dates are in the Spanish Official Gazette (BOE) today and what we still have to finish.

In a nutshell

Spain's General Tax Act (Art. 29.2.j) requires invoicing software to keep records that are complete, traceable and unalterable. Royal Decree 1007/2023 implements it and Order HAC/1177/2024 sets the technical specifications.

According to the consolidated BOE text as of 11/11/2026, companies must comply before 01/01/2027 and everyone else before 01/07/2027. The Ministry of Finance announced on 05/10/2026 that it plans to postpone it to October 2028, but no rule has been published.

In our ERP every invoice creates a record with a SHA-256 hash chained to the previous one. The database won't allow those records to be changed or deleted: corrections are made with a new record.

This article is accurate as of: 11/11/2026.

What the rules require

It starts with Art. 29.2.j) of Law 58/2003, the General Tax Act. It requires producers, sellers and users to make sure invoicing software guarantees the integrity, retention, accessibility, legibility, traceability and unalterability of the records.

Royal Decree 1007/2023 makes it concrete. The essentials fit into three ideas:

  1. One record per invoice. The software automatically creates an invoicing record when the invoice is issued or just before (Art. 9).
  2. Chained, unalterable records. They must be chained so their trail can be followed from first to last. A correction or a cancellation is made with at least one additional later record, leaving the original untouched (Art. 8.2).
  3. Submission to the tax agency, if you choose VERI*FACTU. A system that sends every record to the Spanish Tax Agency (AEAT) continuously, automatically and instantly is a «VERI*FACTU System». In return it doesn't have to sign the records electronically: calculating their hash is enough (Art. 16).

Order HAC/1177/2024 sets out the technical, functional and content specifications for all of the above.

The dates in the BOE today

As checked in the consolidated BOE text on 11/11/2026, the fourth final provision of Royal Decree 1007/2023 says this, as worded by Royal Decree-Law 15/2025:

WhoMust have the system ready
Corporate income tax payers (Art. 3.1.a)Before 01/01/2027
The rest of Art. 3.1: self-employed people with a business activity, non-residents with a permanent establishment and pass-through entitiesBefore 01/07/2027

The Spanish Parliament ratified Royal Decree-Law 15/2025 on 11/12/2025 (BOE of 16/12/2025). Anyone keeping their VAT books through the AEAT online office under Art. 62.6 of the VAT Regulation, known as SII, is outside the scope of the regulation (Art. 3.3).

On 05/10/2026 the Ministry of Finance published a note saying it plans to postpone the pending obligations to October 2028, to line them up with mandatory e-invoicing. It's a plan: as of 11/11/2026 there is no rule in the BOE that changes the dates. Until there is, the dates in the table apply.

The chained hash, explained with our code

The hash is what turns a list of invoices into a chain. In our ERP, when you issue an invoice, the software does this:

  1. Gives it a number within its series and year.
  2. Looks up the hash of the last record it created, whether an issue or a cancellation.
  3. Builds a text string with the issuer's tax ID, the invoice number, the issue date, the invoice type, the tax amount, the total, the previous hash and the date and time with its time zone.
  4. Calculates the SHA-256 of that string. The result, 64 hexadecimal characters, is the invoice's hash.
  5. Stores the record together with the string used, so anyone can recalculate it. It also builds the address for the AEAT verification QR code.

Because every hash includes the previous one, changing a single detail of an old invoice breaks every invoice after it. You don't have to trust anyone: just recalculate.

A practical detail: the amount in the record is the tax base plus VAT. If an invoice includes disbursements (costs you pay on the customer's behalf), they go on the invoice and in the accounting entry but not in the invoicing record.

Truly unalterable: the database says no

The regulation requires corrections to be made with a new record and the original to stay untouched. We didn't leave that to anyone's discipline. The invoicing records table has a trigger that rejects any update or deletion, including from the service account that has every permission. It only accepts additions.

OperationWhat the ERP does
IssueIssue record with its chained hash and QR code. Without the company's tax ID set up, it won't issue anything.
CancelCancellation record, chained to the last one. The invoice is cancelled but its issue record stays in the chain. It won't cancel the same invoice twice.
CorrectDraft corrective invoice in its own series, with negative amounts and the details of the invoice it corrects (Art. 15.4 of Royal Decree 1619/2012). It is reviewed and issued like any other, with its own hash.

Submission to the AEAT is kept separate: each submission is logged as an event, with the tax agency's response, but it doesn't enter the hash chain.

Submission to the AEAT and what is left

The ERP builds the XML for the issue or cancellation record and sends it to the AEAT web service, authenticating with the taxpayer's electronic certificate. Without a certificate set up it sends nothing and says so. It also has a switch to use the AEAT test environment instead of the live one.

Now for what's missing. Today submission is triggered with a button, «Enviar a AEAT» (send to AEAT), one invoice at a time. To be a VERI*FACTU System, Art. 16 requires every record to be sent automatically and instantly. That's what we still have to finish, along with validating the XML in the test environment before going live, as the code itself warns. Until that's done, we don't claim our ERP is a VERI*FACTU System.

What you need to do

  • Ask whoever sells you the software whether it creates the chained hash, whether it lets you edit invoices already issued and whether it sends the records to the AEAT. If you're told you can edit an issued invoice without leaving a trace, that software doesn't comply with Art. 8.
  • Note your date depending on whether you pay corporate income tax. And keep an eye on the BOE: the announced postponement doesn't count until it's published.
  • Decide whether you'll send to the AEAT. If you opt for VERI*FACTU, the choice lasts at least until the end of the calendar year of your first submission (Art. 16.5).
  • Don't leave it to the last month. Changing invoicing software means moving series, customers and templates.

If you'd like to tell us something about this article, write to us from the contact page.

Frequently asked questions

When does Verifactu become mandatory?

According to the BOE as of 11/11/2026: before 01/01/2027 for corporate income tax payers and before 01/07/2027 for everyone else. The Ministry of Finance has announced it plans to move it to October 2028, but no rule has been published.

Do I have to send my invoices to the tax agency?

It isn't mandatory. You can use a VERI*FACTU System, which sends every record to the AEAT and doesn't have to sign them, or a system that doesn't send them and meets the rest of the regulation's requirements, including electronic signature of the records.

What is the hash?

A SHA-256 digest of the invoice data that includes the hash of the previous invoice. If anyone changes a detail, the hash no longer matches and the chain breaks.

Can I correct an invoice that has already been issued?

Yes, but not by editing it. You cancel it with a cancellation record or issue a corrective invoice that identifies the one being corrected. The original record is kept.

Does it apply to companies in the SII?

No. The regulation doesn't apply to anyone keeping their VAT books through the AEAT online office under Art. 62.6 of the VAT Regulation (Art. 3.3 of Royal Decree 1007/2023).

Any questions about this?

Write to us from the contact form and a member of the team will get back to you.

Sources