SAFTCheck
Docs / atcud
atcud.format

ATCUD format — VALIDATION-SEQUENCE since 2023

Mandatory unique-document code: 8 uppercase alphanumeric chars, dash, sequence ≥ 1.

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. It links the document to a registered series at AT plus a sequential position within that series.

The format

ATCUD has two parts joined by a single dash:

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

SAFTCheck applies the regex:

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

Examples

ValueVerdictWhy
AAJFK4DH-18 uppercase + dash + 1
BCDEF123-998 uppercase + dash + 99
1234ABCD-1000000Mix of digits + letters OK
0✓ (sentinel)Allowed for documents whose series predates ATCUD obligations
aaaaaaaa-1Lowercase validation code
AAJFK4DH1Missing dash
AAJFK4DH-0Sequence must be ≥ 1
AAJFK4DH-001Leading zero
SHORTCD-1Validation code must be exactly 8 chars

How to fix

Look at the offending document in your ERP and the series registration on the AT portal:

  1. Confirm the series validation code with AT (Portal das Finanças → Faturação → Comunicação de séries).
  2. Make sure the ERP stores the validation code in uppercase exactly as AT issued it.
  3. Re-emit the document with the corrected ATCUD — or use the inline editor to patch this one occurrence in place. The editor includes a one-click UPPERCASE button for the common lowercase-validation-code case.

Related

Other rules

Usamos um cookie de sessão para autenticação e um cookie de idioma. Sem rastreadores de terceiros. Veja a nossa Política de Privacidade.