Verifactu QR code: size, position and content of the tax QR code
The Verifactu QR code (tax QR) is a QR code containing a Spanish Tax Agency (AEAT) URL, unique to each invoice, that lets the recipient check, if the invoice comes from a VERI*FACTU system, that it is on record at the AEAT. It must go at the start of the invoice, measure between 30 × 30 and 40 × 40 mm and, in the VERI*FACTU mode, come with the legend «VERI*FACTU» or «Factura verificable en la sede electrónica de la AEAT», under Order HAC/1177/2024.
What the Verifactu tax QR code is
It is an AEAT verification URL encoded in a QR, unique to each invoice. «Tax QR» (QR tributario) is the name the AEAT uses in its FAQ to tell it apart from any other QR on the invoice; the rules call it the «QR» code.
It is mandatory from the Verifactu dates: 1 January 2027 for Corporate Income Tax payers and 1 July 2027 for everyone else, according to the BOE, with a postponement to October 2028 announced but no rule published. More in When Verifactu comes into force.
Is the QR mandatory on every invoice?
Yes, on every invoice issued with an invoicing computer system subject to the RRSIF, full or simplified (receipts), and in both modes, according to the AEAT. The obligation is in arts. 6.5 and 7.5 of the Invoicing Regulation, introduced by RD 1007/2023. What changes with the mode is the legend: it only appears in VERI*FACTU.
It does not go on delivery notes, according to the AEAT. In a structured e-invoice the QR is not printed: its URL is included as a separate field (Order HAC/1177/2024, art. 20.2); in a PDF it goes as on paper.
Size of the Verifactu QR code
| Measure | Value | Source |
|---|---|---|
| Minimum | 30 × 30 mm | Order HAC/1177/2024, art. 21.1 |
| Maximum | 40 × 40 mm | Order HAC/1177/2024, art. 21.1 |
| Code standard | ISO/IEC 18004 | Order HAC/1177/2024, art. 21.1 |
| Error correction | Level M (medium) | Order HAC/1177/2024, art. 21.1 |
| Quiet zone | At least 4 modules (ISO/IEC 18004); the QR codes Verifacti generates use 6 | ISO/IEC 18004 |
Where the QR goes on the invoice
- At the start of the invoice, before its content: it is the first QR on the invoice.
- On a portrait invoice, at the top, near the top margin, preferably centred or, if not, near the top-left margin.
- On a landscape invoice, on the left, preferably near the top-left margin.
- Only once: if the invoice has several pages, on the first one.
Source: AEAT FAQ, which allows another position if there are obstacles, as long as the QR is clearly visible and distinguishable from any other code.
What the QR contains
The AEAT verification URL (https://www2.agenciatributaria.gob.es/wlpl/TIKE-CONT/ValidarQR in the VERI*FACTU mode) with four invoice parameters:
| Parameter | What it is |
|---|---|
nif | NIF of the invoice issuer |
numserie | Invoice series and number |
fecha | Issue date |
importe | Invoice total |
The «VERI*FACTU» legend
In the VERI*FACTU mode, the invoice also carries the phrase «Factura verificable en la sede electrónica de la AEAT» or «VERI*FACTU», according to the AEAT, in a clearly visible font and size, similar to the rest of the invoice data (Order HAC/1177/2024, art. 20.1.b). In the NO VERI*FACTU mode the invoice carries the QR but not this legend. Differences in VERI*FACTU and NO VERI*FACTU modes.
How the recipient checks an invoice with a QR
They scan the QR with any device with a camera; the AEAT recommends its app. The AEAT website answers depending on the system that issued the invoice: Factura encontrada (invoice found: VERI*FACTU system, an identical invoice is on record), Factura no encontrada (invoice not found: VERI*FACTU system, not on record) or Factura no verificable (invoice not verifiable: NO VERI*FACTU system, which does not send records). To generate a test QR and see what it contains: Verifactu QR generator.
The QR, straight away with the Verifactu API
With the Verifactu API, the synchronous response to each invoice includes the QR in Base64 (PNG), ready to print next to the legend. The record is then sent to the AEAT.
How to add it to the invoice PDF: Verifactu in PHP.
Questions about the Verifactu QR code
Is the QR mandatory on every invoice, receipts included?
How does my customer check an invoice with a QR?
Does the QR always carry the VERI*FACTU legend?
How do I generate the Verifactu QR?
What size must the QR be?
Generate your invoices’ QR through an API
With the free account, send a test invoice and get its QR straight away.