ATCUD: What It Is, How to Read It and What If It's Missing
Portugal's unique document code, explained: where the validation comes from, what each half means, where it appears, and what to do if it's missing.

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. At least 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, and only then 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 else is inside the QR code is in the article on the QR code.
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 cancelling and reissuing. A certified document cannot be edited, and a credit note does not serve for formal errors that change neither the amount nor the VAT (Circular Letter 25120/2026). If fifty went out in the wrong series, that is fifty cancellations and fifty new documents.
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 in the series now filed, with your accountant.
- 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. The characters carry no meaning, so they 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. In January this happens to a lot of people: follow the December checklist.
- 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
Rioko issues through your invoicing software (InvoiceXpress, Moloni, Moloni ON, Vendus or TOConline), and that software puts the ATCUD and QR Code on the document. So the series has to be filed there before you connect the shop or the payments. If the software refuses the document, the sale is flagged in the dashboard to be resolved. In TOConline, a series not yet filed is refused from the start.
See how Rioko invoices sales from Shopify, Stripe, Lodgify, Easypay and EuPago, and check the pricing.
Sources
Frequently asked questions
What do the two parts of the ATCUD mean?
The first is the series validation code, assigned by the tax authority and identical on every document in that series. The second is the document's sequence number within it.
Since when has it been mandatory?
Since 1 January 2023, on all invoices and other tax-relevant documents.
Where does the ATCUD appear on the invoice?
On every page of the document and, when there is a QR Code, immediately above it, in the format ATCUD:code-number, under Portaria 195/2020.
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. It is fixed by cancelling the documents and issuing them again in the series already filed, checking the case with your accountant.
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.
Does Rioko generate the ATCUD?
No. Rioko issues through your invoicing software (InvoiceXpress, Moloni, Moloni ON, Vendus or TOConline), and that software puts the ATCUD and QR Code on the document.
Still have questions
Write the question. It reaches a person, not a form.




