Invoicing Blog Help Create account

ATCUD and QR code: the mandatory codes on your invoices

That odd code and the QR square on the invoice aren't decoration - they're the ATCUD and QR code, required by law. What they are, since when, and what to do.

ATCUD and QR code: the mandatory codes on your invoices

You look at a recent invoice and see, at the bottom, a QR square and a code starting with “ATCUD:”. They’re not decorations or optional - they’re required by law (the ATCUD on every invoice; the QR code on those issued by certified software) and they help identify and trace each invoice (and let your client register it on e-Fatura). Here’s what they are and what you have to do.

What they are

They’re part of the same legal package (Decree-Law 28/2019 and Ordinance 195/2020), created to fight fake invoices and the shadow economy:

The two codes
QR code
A square that sums up the invoice data. It lets the client register it on e-Fatura with just their phone, even if they didn't ask for an invoice with their NIF
on certified-software documents, since 2022
ATCUD
The 'unique document code': it joins your series' validation code (given by the AT) to the invoice's sequential number - in the format 'ATCUD:[validation code]-[document no.]'
mandatory since 2023

In practice, where there’s a QR code the ATCUD appears above it. The ATCUD must be on every page of the document; the QR code is required on documents issued by certified software.

Where the ATCUD comes from

Here’s the one part that needs an action from you: the validation code that forms the ATCUD isn’t made up - it’s assigned by the AT when you communicate your document series. After that, each invoice in that series carries the ATCUD automatically.

How you do it depends on how you invoice:

Invoicing on the Portal das Finanças
  • The Portal handles communicating the series
  • The ATCUD comes out on the invoice (the QR is certified-software only)
  • Nothing to install
vs
Certified invoicing software
  • The program usually communicates the series to the AT for you (check the setup)
  • It generates the ATCUD and QR automatically
  • It must be AT-certified software

So if you use the Portal das Finanças or a certified program, this happens automatically, as a rule - you don’t have to calculate anything (but confirm the series was communicated). There are also documents pre-printed by an authorised printer; the mistake to avoid is invoicing outside the lawful channels - a hand-made Word document, say, which isn’t a valid document.

Careful: the ATCUD depends on your series being communicated to the AT. If you switch software, or open a new series, confirm the communication was done - otherwise invoices come out without a valid code. When in doubt, your accountant or the software’s support confirms it in a minute.

✅ In summary

  1. The ATCUD and QR code are mandatory on invoices (ATCUD since 2023, on all documents; QR since 2022, on certified-software ones) - part of the fight against fake invoices (DL 28/2019 + Ordinance 195/2020).

  2. The ATCUD comes from the series communicated to the AT. If you invoice on the Portal das Finanças or in certified software, the ATCUD comes out automatically - you just need the series to be communicated. The QR code appears only on certified-software invoices (the Portal and pre-printed documents don’t generate it).

  3. With FIZ your invoices come out with the ATCUD and QR code already on them, compliant, without you having to think about it. See the plans.

Ready to simplify your tax life?

Join over 15,000 independent workers already using FIZ.

Start for free