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?#
| Rule | What 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?#
| Status | Meaning | What to do |
|---|---|---|
| Waiting to be sent | In the queue | Nothing |
| Accepted by AEAT | Correcto, with a CSV | Nothing |
| Accepted with errors | Stored by the AEAT, but with an error it asks you to correct | Create a correction (except code 2004) |
| Rejected | Not stored by the AEAT | Fix the data, create a correction |
| Message rejected | The whole message failed (SOAP fault) | Fix settings, then Send again |
| Kept | NO VERI*FACTU mode, not sent | Nothing |
| Replaced by a correction | A later record corrects it | Nothing |
Common AEAT codes#
| Code | Meaning | Usual fix |
|---|---|---|
| 4104 | Taxpayer NIF in the header not identified | Check NIF and name in Settings |
| 4112 | Certificate holder is not the taxpayer nor authorised | Use the right certificate or register the representation |
| 1100 | A field has a wrong value or type | Check the record XML, fix the order, correct |
| 2000 | The AEAT calculated a different huella | Run the chain check, contact support |
| 2001 | Customer NIF not in the AEAT census | Confirm the NIF with the customer, correct |
| 2004 | Record time differs from the AEAT clock | Sync the server clock, no correction needed |
| 2005, 2006 | Total or tax total does not match the breakdown | Check order totals, correct |
| 2007 | Marked as first record but the AEAT already has records | Contact support |
| 3000 | Duplicate record | If 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?