The fields of each mode
The AEAT validation document splits the header fields like this:
- FechaFinVeriFactu
- Only in systems that issue verifiable invoices. From 1 January 2027 it must have the format 31-12-20XX, with the year equal to that of the AEAT system or the year before.
- Incidencia
- Only in systems that issue verifiable invoices.
- RefRequerimiento
- Only in systems that issue non-verifiable invoices, and mandatory in them. The reference must exist at the AEAT.
The difference is not only about fields. In a submission under request, according to section 4.3.2 of the AEAT document, business errors are not corrected: records are sent as they were kept in the system when they were generated, and those errors are flagged as admissible, except the ones about identifying the tax ID or IDOtro.
As with anything that fails in the header, any of these errors rejects the whole submission: no invoice gets in.

The ten codes
| Code | What the AEAT says, in short |
|---|---|
| 4120 | Wrong FechaFinVeriFactu: it must be 31-12-20XX, of the current year or the year before. |
| 4121 | Wrong value in Incidencia. |
| 4122 | Wrong value in RefRequerimiento. |
| 4125 | In a submission under request, RefRequerimiento is mandatory. |
| 4126 | RefRequerimiento only goes in submissions answering a request. |
| 4127 | Voluntary submission is only reported in VERI*FACTU systems. |
| 4129 | FinRequerimiento is mandatory. |
| 4130 | FinRequerimiento only goes in No VERI*FACTU systems. |
| 4131 | Wrong value in FinRequerimiento. |
| 4133 | RefRequerimiento is not alphanumeric. |
What header our module sends
The header built by the module carries only two things: the party obliged to issue, with the company's name and tax ID, and the Representante when a tax adviser submits. It has no voluntary submission block or request block, and none of the fields above. That is why these ten codes cannot come from one of its submissions.
The module knows both modes: each invoice series has its own, and in the software data it declares that it is not used only as VERI*FACTU. What it sends to the AEAT are the registrations and cancellations of the voluntary submission.

What to do if you get one
If you see one of these codes, the submission did not come from our module as published: either someone changed how the header is built, or another program is sending with your tax ID. In both cases:
- Look in AEAT Submission › AEAT Errors at which submissions carry the code and which company they belong to.
- Keep the full answer of the submission, the Raw Response field of the queue.
- Write to comercial@flexigobe.com before resending anything.
The codes on this page, with the AEAT's text
Each code with its literal text, in Spanish, as the AEAT's error list gives it:
| Code | AEAT text (Spanish) |
|---|---|
| 4120 | Error en la cabecera: el valor del campo FechaFinVeriFactu es incorrecto, debe ser 31-12-20XX, donde XX corresponde con el año actual o el anterior. |
| 4121 | Error en la cabecera: el valor del campo Incidencia es incorrecto. |
| 4122 | Error en la cabecera: el valor del campo RefRequerimiento es incorrecto. |
| 4125 | Error en la cabecera: Si el envío es por requerimiento el campo RefRequerimiento es obligatorio. |
| 4126 | Error en la cabecera: el campo RefRequerimiento solo debe informarse en sistemas en remisiones al endpoint del servicio a usar para la contestación a requerimientos de registros de facturación. |
| 4127 | Error en la cabecera: la remisión voluntaria solo debe informarse en sistemas VERIFACTU. |
| 4129 | Error en la cabecera: el campo FinRequerimiento es obligatorio. |
| 4130 | Error en la cabecera: el campo FinRequerimiento solo debe informarse en sistemas No VERIFACTU. |
| 4131 | Error en la cabecera: el valor del campo FinRequerimiento es incorrecto. |
| 4133 | Error en la cabecera: el valor del campo RefRequerimiento no es alfanumérico. |
And if the AEAT sends me a request?
The published module does not answer requests on its own, because it does not build the request header. If you receive one, write to us and we will look at how to handle it with you.
Keep reading
Checked in the module's source code (version 20.0) and the linked sources
Sources
- www.agenciatributaria.es/static_files/AEAT_Desarrolladores/EEDD/IVA/VERI-FACTU/Validacione
- Module source code: flexigo_spain_verifactu 20.0 (aa2ea3d2): models/verifactu_aeat_client.py
- Module source code: flexigo_spain_verifactu 20.0 (aa2ea3d2): data/verifactu_error_catalogue.xml
- prewww2.aeat.es/static_files/common/internet/dep/aplicaciones/es/aeat/tikeV1.0/cont/ws/err
