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 VeriFactu works in Frihet
Creating a fiscal record and submitting it to AEAT are separate steps. A hash or QR code does not prove that an invoice was submitted or accepted in production.
- Issuing an invoice generates its record and the SHA-256 hash chain on the server. A draft is not evidence of issuance or submission.
- To submit records, configure a digital certificate in Taxes → Compliance.
- Test mode (sandbox) and Auto-submit to AEAT are independent controls. Acceptance in the test environment does not prove production submission.
- The PDF represents the state and environment saved for that invoice. Changing the account's current mode does not turn a test invoice into one submitted to production.
See the setup and submission guide to upload your certificate and check the result.
SHA-256 Hash Chain
Each invoice generates an SHA-256 hash on the server. 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:
| Field | Description |
|---|---|
| NIF emisor | Issuer tax identification |
| Invoice number | Full number (series + sequence) |
| Issue date | In DD-MM-YYYY format |
| Invoice type | F1, F2, R1-R5 |
| Total tax amount | Sum of all taxes |
| Total amount | Invoice total |
| Previous hash | Hash of the immediately preceding invoice |
| Registration date/time | Timestamp of generation moment |
Cancellation Hash
When cancelling an invoice, a cancellation hash is generated with 5 fields:
| Field | Description |
|---|---|
| NIF emisor | Issuer NIF |
| Invoice number | Number of the cancelled document |
| Issue date | Original invoice date |
| Previous hash | Hash of the previous invoice in the chain |
| Registration date/time | Cancellation 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:
| Code | Type | Description |
|---|---|---|
| F1 | Full invoice | Standard invoice (assigned by default) |
| F2 | Simplified invoice | Invoices under 400 EUR without recipient's NIF |
| R1 | Rectifying (art. 80.1-2, 80.6 LIVA) | Errors, retroactive discounts (most common) |
| R2 | Rectifying (art. 80.3 LIVA) | Insolvency proceedings (concurso de acreedores) |
| R3 | Rectifying (art. 80.4 LIVA) | Wholly or partly uncollectible debt |
| R4 | Rectifying (rest) | Other cases |
| R5 | Simplified rectifying | Rectifying 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.
| Code | Regime |
|---|---|
| 01 | General regime |
| 02 | Export |
| 03 | Special regime for used goods |
| 04 | Special regime for investment gold |
| 05 | Special regime for travel agencies |
| 06 | Special regime for groups of entities |
| 07 | Special regime for cash-basis accounting |
| 08 | Operations subject to IPSI/IGIC |
AEAT QR on invoices
The QR code lets the recipient check or report invoice data to AEAT. Its presence does not prove that AEAT received the record. AEAT explains the possible results in its invoice checking guide.
| Evidence saved for the invoice | PDF presentation |
|---|---|
| Acceptance with an AEAT response matching the invoice and an explicit production environment | Production verification QR and wording identifying a verifiable invoice |
| Sandbox acceptance with a response matching the invoice | Test-environment QR and test notice, without claiming production verification |
| No confirmed acceptance, with a known environment | Tax QR and a notice that submission is not confirmed; not presented as VERI*FACTU |
| Unknown environment or insufficient data to generate the QR | No verification QR or claim of production registration |
Submitted means an attempt is in progress; it does not prove acceptance. A CSV or hash alone does not replace the AEAT response either. See what to check when the QR does not verify the invoice.
Software responsible declaration
Software information and links to the producer's declaration are in Taxes → Compliance. Open Producer's responsible declaration (signed PDF) to consult the document for the software.
The manufacturer and its tax ID are read-only producer details. They are not configured through your certificate or your company's fiscal details. Manage your own details in the tax profile.
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:
- Modelo 303 (IVA) — for Peninsula and Balearic Islands
- Modelo 420 (IGIC) — for Canary Islands
- Modelo 130 (IRPF) — for all self-employed individuals
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 and a connection authenticated with a digital certificate. With this phase active, each invoice issued or cancelled is transmitted to AEAT's VeriFactu service in the background.
The submission requires a valid digital certificate (.pfx or .p12) configured in Taxes → 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.
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