ATCUD: What It Is, How to Read It, and What Happens When It Is Missing
Anatomy of Portugal's unique document code: where the validation code comes from, what each half means, where it shows on the invoice, and what to do when a document goes out without it.
It has been on every Portuguese invoice since 2023, almost nobody can read it, and when it is missing it is always a symptom of something else. The ATCUD is the unique document code, and it comes down to one idea: give every tax document issued in Portugal an identifier that no other document, from any other company, can carry.
How to read it
ATCUD: CSDF7T5H-00042
Two halves, with completely different origins:
CSDF7T5His the series validation code. Eight characters assigned by the tax authority, once, when you file the series. It is the same on every document in that series.00042is the document's sequence number inside the series. It grows one by one, with no gaps and no repeats.
Hence the name: the code identifies the series, the number identifies the document within it, and the pair is unique across the country.
Where the series and the ATCUD appear on a certified document.Where the validation code comes from
It is not generated by the software. It is returned by the tax authority when you file the series, and it does not exist before that moment.
The shape of the Register Series form on the Portal das Finanças. The validation code is what comes back.That is why the order matters: file the series → receive the code → issue. The other way round does not work, and it is behind nearly every document that goes out without an ATCUD.
The filing itself is covered in Invoice series: what they are and how to file them, and the user who does the filing in ATCUD: creating the user at the tax authority.
One code per series, and per document type
The code belongs to the series, not to the company and not to the document. A company with four series has four different validation codes.
And because each document type needs its own series, the number of codes multiplies quickly: invoices, credit notes, simplified invoices, delivery notes. Each with its own.
The ATCUD and the QR Code are one story
The mandatory QR Code carries the ATCUD inside it, together with the issuer's and the buyer's VAT numbers, the total, the VAT per rate and the document's signature.
If the ATCUD is wrong or missing, so is the QR Code. They are not two checks, they are the same one. A QR Code that will not open, or that opens without an ATCUD, is telling you the series was never filed.
What happens if it is missing
Nothing, immediately. The document goes out, the customer receives it, the sale closes. That is precisely the problem.
What happens later:
- The SAF-T file is rejected, or accepted with errors, because the series does not match what was filed.
- The document is not valid for the customer to deduct VAT, if the customer is a business. They will be the ones to complain, and they will be right.
- Fixing it means a credit note and a reissue. A certified document cannot be edited. If fifty went out in the wrong series, that is fifty credit notes and fifty reissues.
What to do when a document went out without one
- Stop issuing in that series. Every extra minute is more documents to correct.
- Check whether the series is filed, and filed for that document type. It is common for invoices to be filed and credit notes not.
- File what is missing and paste the validation code into the series inside the software.
- Void and reissue the affected documents, with credit notes, in the now certified series.
- Write down what happened, with dates. If someone later asks why a series has fifty voided documents, the answer has to exist in writing.
Common mistakes
- Copying the validation code from another series. Eight harmless characters are easy to mix up. Nothing fails at issue time, and every document ends up carrying a code that belongs to a different sequence.
- Assuming the software generates the code. It does not. An empty ATCUD field means the tax authority has not returned one yet.
- Filing the series after the first document. Documents already issued do not acquire an ATCUD retroactively.
- Switching series halfway and forgetting a document type. The new series covers invoices while credit notes keep coming out of the old one, which has already been deactivated.
How Rioko helps
Before issuing, Rioko checks that the series you picked exists in your account, that it has been filed, and that it covers the document type about to go out. If any of that fails, issuing stops with a clear message instead of producing a document with no ATCUD that then needs a credit note.
At the turn of the year, which is when this happens to everyone at once, the dashboard warns you before January's first sale.
Frequently asked questions
What do the two parts of the ATCUD mean?
The first is the series validation code, eight characters assigned by the tax authority and identical on every document in that series. The second is the document's sequence number within it.
Does the software generate the validation code?
No. The tax authority returns it when you file the series. An empty ATCUD field means the series has not been filed yet.
Do I get one validation code per company or per series?
Per series, and per document type. A company with four series has four different codes.
I issued documents without an ATCUD. Is that serious?
Not immediately, but later: the SAF-T file can be rejected and a business customer cannot use those documents to deduct VAT. Fixing it takes a credit note and a reissue in the already certified series.
Are the QR Code and the ATCUD the same thing?
No, but they travel together: the ATCUD sits inside the QR Code, along with the VAT numbers, the total and the VAT per rate. If the ATCUD is wrong, so is the QR Code.
Still have questions
Write the question. It reaches a person, not a form.