SAFTCheck
← Blog
2026-04-09 · 3 min read

ATCUD format errors and how to fix them

The 8-character validation code, the dash, the sequence — what AT expects since 2023 and the patterns that fail.

What ATCUD is

ATCUD (Código Único de Documento) is a unique document code AT mandates on every invoice, receipt, transport document, and SAF-T entry since 1 January 2023. Each document carries an ATCUD that links it to a registered series at the AT and to a sequential position within that series.

The format AT expects

An ATCUD has two parts joined by a dash:

<VALIDATION-CODE>-<SEQUENCE-NUMBER>
  • Validation code: exactly 8 uppercase alphanumeric characters (A–Z, 0–9). AT issues this when you register a document series.
  • Sequence number: a positive integer, no leading zeros, starting at 1.

Examples that match:

AAJFK4DH-1
BCDEF123-99
1234ABCD-1000000

Examples that fail:

aaaaaaaa-1       (lowercase validation code)
AAJFK4DH1        (missing dash)
AAJFK4DH-0       (sequence cannot be 0)
AAJFK4DH-001     (leading zero)
SHORTCD-1        (validation code less than 8 chars)

The literal value 0 is also accepted as a sentinel for documents whose series predates ATCUD obligations — but you should not be emitting new documents with this sentinel in 2026.

The regex AT applies

/^[A-Z0-9]{8,8}-[1-9]\d{0,9}$/

If your ERP is producing values that don't match this exactly, the SAF-T submission fails. Some legacy ERPs export the validation code in lowercase, others trim leading zeros incorrectly, others concatenate without the dash.

Where to find errors fast

SAFTCheck scans every <ATCUD> element in your file and lists each one that doesn't match. You get the offending value and the rule that fired, so you can grep it back to the originating document in your ERP and re-emit.

Validate your SAF-T file — it's free for one validation per IP per day.

Other posts

Usamos una cookie de sesión para iniciar sesión y una cookie de idioma. Sin rastreadores de terceros. Consulta nuestra Política de Privacidad.