Skip to main content
VeriFactu

VeriFactu errors with your company tax ID: 4104, 4107, 4109, 4115, 4116 and the IDEmisorFactura family

Every invoice you send to VERI*FACTU carries your tax ID twice: in the header, as the party obliged to issue, and in each invoice, as the issuer. If the AEAT, the Spanish tax agency, does not recognise it, the rejection can hit the whole request or each record. Fixing it in Odoo fixes what you post from then on, but not what is already posted: the tax ID also goes into each invoice's hash, which is calculated at posting and does not change.

FlexigoTech · Editor in charge: Víctor Gómez · Updated 4 November 2026

Key facts

Module
VeriFactu
Versions
Odoo 17, 18, 19 and 20
Checked
in the module's source code, version 20.0 · against the sources linked at the end
Reading time
4 min

Where your tax ID goes in each submission

ObligadoEmision, in the header
The company name, 120 characters at most, and its tax ID (NIF). Once per request.
IDEmisorFactura, in each record
The same tax ID, inside the identifier of each invoice.

In Odoo that tax ID comes from the company's NIF for Verifactu field or, if it is empty, from the company's tax ID. The AEAT validation document asks for two things: the tax ID of the obliged party has to be identified at the AEAT, and the one on each invoice has to match the header.

Card for the issuer tax ID errors in VeriFactu
The thirteen issuer tax ID codes: in red the header ones, which reject the whole request, and in amber those of each record.

The header codes

If the problem is in the header, the AEAT rejects the whole request: no invoice of that submission gets in. The texts, in Spanish, say that the tax ID is not identified, not in the census, badly formatted or incorrect:

CodeAEAT text
4104Error en la cabecera: el valor del campo NIF del bloque ObligadoEmision no está identificado.
4107El NIF no está identificado en el censo de la AEAT.
4109El formato del NIF es incorrecto.
4115El valor del campo NIF del bloque ObligadoEmision es incorrecto.
4116Error en la cabecera: el campo NIF del bloque ObligadoEmision tiene un formato incorrecto.

The codes for each record

These reject only the affected invoice. 1108 says the IDEmisorFactura tax ID must be the same as the ObligadoEmision one, and 1120, 1217, 1219 and 1240 flag an IDEmisorFactura of the wrong type, not identified or incorrect. 1172 fires when the tax ID or the obliged party arrive empty and 1215 is the generic error of the ObligadoEmision block. 1282 asks for the name when the header tax ID belongs to an individual.

With our module 1108 should not happen: header and IDEmisorFactura are filled with the same tax ID at the same moment. And the name always travels, because it is the company's.

VeriFactu setup wizard in Odoo with the company tax ID
The setup wizard asks for the company's tax ID; that is the one that ends up in the header of every submission. Odoo 20 screenshot with demo data.

How to fix it

  1. Open the company in Odoo and check NIF for Verifactu. If you leave it empty, the company's tax ID is used, so check that one too.
  2. The tax ID goes without spaces and with its letter. If it belongs to an individual, check that the company name in Odoo is theirs.
  3. Without a tax ID the module does not even send: it stops with Company … has no NIF for Veri*Factu.
  4. With what is already posted, take care before resending. The header and IDEmisorFactura are built on every submission with the tax ID the company has at that moment, but each invoice's hash was calculated at posting, with the tax ID of the time, and it does not change. If you resend it from AEAT Submission › AEAT Errors with Retry Selected, the AEAT recalculates the hash with the new tax ID, it does not match, and the answer is 2000, which the published module does not correct. Write to comercial@flexigobe.com before resending.

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:

CodeAEAT text (Spanish)
4104Error en la cabecera: el valor del campo NIF del bloque ObligadoEmision no está identificado.
4107El NIF no está identificado en el censo de la AEAT.
4109El formato del NIF es incorrecto.
4115El valor del campo NIF del bloque ObligadoEmision es incorrecto.
4116Error en la cabecera: el campo NIF del bloque ObligadoEmision tiene un formato incorrecto.
1108El NIF del IDEmisorFactura debe ser el mismo que el NIF del ObligadoEmision.
1120Valor de campo IDEmisorFactura del bloque IDFactura con tipo incorrecto.
1172El valor del campo NIF u ObligadoEmision son nulos.
1215Error en el bloque de ObligadoEmision.
1217Error identificando el IDEmisorFactura.
1219El valor del campo IDEmisorFactura es incorrecto.
1240Error en el bloque de IdEmisorFactura.
1282Si el NIF de la cabecera es persona fisica se debe informar tambien de su NombreRazon

Header rejections leave submissions in Failed and they are not retried on their own. Record rejections are retried, with the same record and with the tax ID the company has at each attempt: if you fix the tax ID in the meantime, the retries also come back with 2000.

What if the error is 4107 and the tax ID is spelled right?

Then the AEAT cannot find it in its census. With your own company's tax ID that is unusual; check that the AEAT environment you send to is the right one and write to comercial@flexigobe.com with the answer.

Keep reading

VeriFactu errors 4105, 4117, 4123 and 4124: when your tax adviser submits for youVeriFactu errors in the Representante block (4105, 4117, 4123, 4124), when your tax adviser submits for you: what the AEAT checks and which Odoo fields fill that block.VeriFactu error 4112: the certificate you connect with cannot submit those invoicesVeriFactu error 4112: the certificate holder is not the obliged party, a social collaborator, an attorney or a successor. How to check it in Odoo 17, 18, 19 and 20.VeriFactu errors with the customer tax ID: census, format and nameVeriFactu errors on the customer tax ID: census (1109, 1110, 1121, 1193, 1154), format (1123, 1290) and name (1283). What causes them and what Odoo checks before sending.
Checked in the module's source code (version 20.0) and the linked sources

Sources