Skip to main content

VeriFactu

What is VeriFactu

VeriFactu is the electronic invoicing system established by RD 1007/2023 and Order HAC/1177/2024. It applies to all Invoicing Computer Systems (SIF) operating in Spain.

Its objective is to guarantee the traceability of invoices and prevent tax fraud. Each invoice generates a digital footprint (hash) that is chained to the previous one, forming an immutable record verifiable by the AEAT.

How Frihet Complies

VeriFactu compliance in Frihet is always active. There is no toggle, no extra configuration, no module to activate. Frihet is one of the few ERPs that includes VeriFactu by default in all plans -- see the full features.

Everything happens in the background when creating or modifying invoices:

  • The SHA-256 hash is automatically calculated on the server
  • The QR code is generated in each PDF
  • Tax fields are locked after registration
  • The hash chain is maintained continuously

The user does not need to do anything special to comply with VeriFactu.

SHA-256 Hash Chain

Each invoice generates an SHA-256 hash on the server (Cloud Function). This hash is chained with the hash of the previous invoice, forming an immutable chain that guarantees the integrity of the record.

Creation Hash

When creating an invoice, the hash is calculated from 8 fields:

FieldDescription
NIF emisorIssuer tax identification
Invoice numberFull number (series + sequence)
Issue dateIn DD-MM-YYYY format
Invoice typeF1, F2, R1-R5
Total tax amountSum of all taxes
Total amountInvoice total
Previous hashHash of the immediately preceding invoice
Registration date/timeTimestamp of generation moment

Cancellation Hash

When cancelling an invoice, a cancellation hash is generated with 5 fields:

FieldDescription
NIF emisorIssuer NIF
Invoice numberNumber of the cancelled document
Issue dateOriginal invoice date
Previous hashHash of the previous invoice in the chain
Registration date/timeCancellation timestamp

The critical hash fields are immutable once calculated. They cannot be edited after hash generation.

Invoice Types (TipoFactura)

Frihet automatically assigns the invoice type based on the document's characteristics:

CodeTypeDescription
F1Full invoiceStandard invoice (assigned by default)
F2Simplified invoiceInvoices under 400 EUR without recipient's NIF
R1Rectifying (art. 80.1-2, 80.6 LIVA)Errors, retroactive discounts (most common)
R2Rectifying (art. 80.3 LIVA)Non-payment / uncollectible credit
R3Rectifying (art. 80.4 LIVA)Bankruptcy proceedings
R4Rectifying (rest)Other cases
R5Simplified rectifyingRectifying simplified invoice

F2 is automatically assigned when the amount is less than 400 EUR and the recipient does not have an NIF.

VAT Regime Keys (ClaveRegimenIVA)

The regime key identifies the type of tax operation. Frihet assigns the general regime (01) by default.

CodeRegime
01General regime
02Export
03Special regime for used goods
04Special regime for investment gold
05Special regime for travel agencies
06Special regime for groups of entities
07Special regime for cash-basis accounting
08Operations subject to IPSI/IGIC

AEAT QR on Invoices

All PDF invoices generated by Frihet include a verification QR code that links to the AEAT's electronic headquarters.

QR URL format:

https://www2.agenciatributaria.gob.es/wlpl/TIKE-CONT/ValidarQR?nif={NIF}&numserie={NUM}&fecha={DD-MM-YYYY}&importe={TOTAL}

Next to the QR, the text appears: "Invoice verifiable at the AEAT electronic headquarters".

info

The QR code only appears when the tax profile has an NIF configured in SettingsTax profile.

Software Declaration of Conformity

The declaration of conformity complies with Art. 20 of RD 1007/2023. It is visible in SettingsTax profile and contains the following data:

FieldValue
SoftwareFrihet ERP v1.0
Manufacturer(Configured in Settings > Compliance > VeriFactu)
Manufacturer NIF(Configured in Settings > Compliance > VeriFactu)
Hash chainSHA-256
RegulationsRD 1007/2023, Orden HAC/1177/2024

Relationship with Tax Forms

VeriFactu focuses on invoice traceability (hash, QR, immutability). The quarterly tax forms are an additional step where declarations to be submitted to the Treasury are calculated:

VeriFactu data (invoice type, regime key) is automatically included in the record books exported by Frihet.

Phase 3: Submission to AEAT

Phase 3 of VeriFactu allows the automatic submission of invoicing records directly to the AEAT using SOAP/XML messages signed with a digital certificate. With this phase active, each invoice issued or cancelled is transmitted to the AEAT's SII system in the background.

The submission requires a valid digital certificate (.pfx or .p12) configured in Settings > Compliance. It can be activated in sandbox mode for testing before moving to production.

For complete documentation on configuration, submission statuses, retries, and troubleshooting, refer to the Submission to AEAT guide.

Compliance Timeline

Companies (S.L., S.A.): January 1, 2027. Self-employed: July 1, 2027 (RDL 15/2025).

Applicable Regulations

  • Ley 11/2021 (Ley Antifraude) — Art. 29.2.j) LGT
  • RD 1007/2023 — Reglamento VeriFactu (RRSIF)
  • Orden HAC/1177/2024 — Technical Specifications
  • RDL 15/2025 — Deadline Extension

Next: Submission to AEAT (Phase 3) | Immutability and Record-keeping