Spanish Veri*Factu Invoice Hash Generator
Generate and format valid Spanish Veri*Factu Invoice Hash for software testing and development.
About Spanish Veri*Factu Invoice Hash
The Veri*Factu system was established by Anti-Fraud Law 11/2021 and Royal Decree 1007/2023 in Spain, mandating billing systems (SIF) to produce immutable invoice records with sequential SHA-256 hash chaining and instant QR verification for the Spanish Tax Agency (AEAT).
This tool computes the cryptographic signature chain of the current invoice using issuer NIF/CIF, series, number, issue date, total amount, and previous invoice hash, encoding parameters into the official AEAT verification URL.
Anatomy & Structure of Veri*Factu (AEAT)
The Spanish Veri*Factu system specifies structured query parameters for immediate tax audit verification:
| Position | Field | Length | Meaning & Rule | Example |
|---|---|---|---|---|
| nif | Issuer NIF | 9 characters | Tax ID of invoice issuer (DNI, NIE, or CIF) | B12345678 |
| numserie | Series & Invoice | Up to 60 chars | Series code and sequential invoice number | FAC-2026-1001 |
| fecha | Date | 10 chars | Date of issuance formatted as DD-MM-YYYY | 26-08-2026 |
| importe | Total Amount | Variable | Total invoice monetary amount in Euros with 2 decimal places | 150.50 |
| huella | SHA-256 Hash | 16 hex chars | Cryptographic fingerprint of previous invoice for immutable chaining | a1b2c3d4e5f67890 |
Veri*Factu Cryptographic Chaining Algorithm (SHA-256)
Invoice chain integrity and immutability are guaranteed via the SHA-256 cryptographic hash function:
- 1. Concatenate in UTF-8 all mandatory invoice tax fields without spaces.
- 2. Include the cryptographic fingerprint of the immediately preceding invoice to form the blockchain-like link.
- 3. Execute standard SHA-256 algorithm per FIPS PUB 180-4.
- 4. Extract the first 16 hexadecimal characters to embed in the QR code URL parameters.
- 5. The generated QR URL enables instant verification on the AEAT electronic tax portal.