Skip to content
pluginloom

AEAT

Submissions to the AEAT and error codes

How Encadena sends records to the AEAT in VERI*FACTU mode: order, 1,000-record limit, wait time, hourly retries, the Incidencia flag, statuses and what common AEAT error codes mean.

Last updated by the PluginLoom team

In VERI*FACTU mode every record goes to the AEAT web service. Encadena sends them in the background, every minute, following the rules in Orden HAC/1177/2024 art. 16 (BOE-A-2024-22138 (opens in a new tab), checked October 24, 2026).

How are records sent?#

RuleWhat Encadena does
Order of generation (art. 16.4)Records go in the order they were created
At most 1,000 records per message (Annex 2.2)Batches of up to 1,000
Wait time between messages, 60 seconds to start (art. 16.2)Waits the TiempoEsperaEnvio the AEAT returns, unless 1,000 records are waiting
Retry at least every hour after an incident (art. 16.4)Retries at 1, 2, 5, 15, 30 and then every 60 minutes
Flag late records (art. 16.4)Sets Incidencia = S on messages that carry delayed records
Show how many records are waiting (art. 16.4)A notice on every admin screen while a failure lasts

WP-Cron runs only when the site gets visits. On a quiet site, set a real system cron that calls wp-cron.php every minute.

The AEAT test portal and production use different addresses (prewww1.aeat.es and www1.agenciatributaria.gob.es), both from the official WSDL. The offline simulator never leaves your server.

What do the statuses mean?#

StatusMeaningWhat to do
Waiting to be sentIn the queueNothing
Accepted by AEATCorrecto, with a CSVNothing
Accepted with errorsStored by the AEAT, but with an error it asks you to correctCreate a correction (except code 2004)
RejectedNot stored by the AEATFix the data, create a correction
Message rejectedThe whole message failed (SOAP fault)Fix settings, then Send again
KeptNO VERI*FACTU mode, not sentNothing
Replaced by a correctionA later record corrects itNothing

Common AEAT codes#

CodeMeaningUsual fix
4104Taxpayer NIF in the header not identifiedCheck NIF and name in Settings
4112Certificate holder is not the taxpayer nor authorisedUse the right certificate or register the representation
1100A field has a wrong value or typeCheck the record XML, fix the order, correct
2000The AEAT calculated a different huellaRun the chain check, contact support
2001Customer NIF not in the AEAT censusConfirm the NIF with the customer, correct
2004Record time differs from the AEAT clockSync the server clock, no correction needed
2005, 2006Total or tax total does not match the breakdownCheck order totals, correct
2007Marked as first record but the AEAT already has recordsContact support
3000Duplicate recordIf it was accepted before, nothing else is needed

The full list (247 codes) comes from the AEAT file errores.properties referenced in Validaciones y errores v1.2.2 (opens in a new tab), section 4.4, checked October 24, 2026. Encadena shows the AEAT text for any code it has no plain explanation for.

Status of the live test#

The AEAT test web service needs a real qualified certificate. Encadena's client is tested against the AEAT's official XML schemas and an offline simulator; a live run on the AEAT test portal is pending a certificate.

Was this page helpful?