ATCUD is the unique document code required on Portuguese invoices and other tax relevant documents. It joins a validation code that the tax authority (AT) issues for each document series with the document's sequence number, and is printed above the invoice's QR code. The QR code holds the invoice's key data in fields separated by asterisks.
Portaria 195/2020 sets out both: ATCUD applies to invoices and other tax relevant documents, while its QR-code requirement concerns documents issued by AT-certified software. Klarbon support is planned, not available yet.
What is in an ATCUD?
| Part | Value |
|---|---|
| Prefix | ATCUD: on the document |
| Series validation code | issued by the AT for the series, at least 8 characters |
| Separator | a hyphen |
| Sequence number | the document's number within the series |
| Example | ATCUD:CSDF7T5H-0035 |
| On multi page documents | on every page, and directly above the QR code |
The format and the series reporting come from Portaria 195/2020, under Decree-law 28/2019 (Portaria 195/2020).
What is in the invoice QR code?
| Code | Field |
|---|---|
| A | issuer's tax number |
| B | buyer's tax number |
| C | buyer's country |
| D | document type, such as FT or FS |
| E | document status |
| F | document date, as YYYYMMDD |
| G | unique identification of the document |
| H | ATCUD |
| I to K | tax base and tax per rate, by tax region |
| L to P | non taxable amounts, stamp duty, total tax, gross total, withholding |
| Q | four characters of the document hash |
| R | software certificate number |
| S | other information, such as payment data |
Fields are written as code, colon and value, joined by asterisks; amounts use a full stop and two decimals. The image must be at least 30x30 mm (QR specification).
ATCUD or SAF-T (PT)?
| ATCUD and QR | SAF-T (PT) | |
|---|---|---|
| What | identifiers printed on each document | an XML file of invoices or accounts |
| Who sees it | the buyer, on the document | the AT |
| Made by | the certified invoicing software, for each document | the invoicing or accounting software, for a period |
What does Klarbon do with ATCUD and QR codes?
Reading ATCUD and Portuguese invoice QR codes is planned, not available yet. Klarbon does not request series validation codes from the AT or create ATCUDs, and it is not certified invoicing software.
Related
Frequently asked questions
What is ATCUD?
The Código Único de Documento, a unique code on every Portuguese invoice and other tax relevant document. It joins the validation code the tax authority gives for the document series with the document's sequence number in that series.
How does an ATCUD look?
It is printed as ATCUD followed by a colon, the series validation code, a hyphen and the sequence number, for example CSDF7T5H-0035 after the prefix. The validation code is at least eight characters long.
Where does the validation code come from?
The issuer reports each document series to the tax authority (AT) before using it, with its type and planned start date, and the AT returns a validation code for that series.
What is in the Portuguese invoice QR code?
Fields such as the issuer's and buyer's tax numbers, the buyer's country, the document type, status, date, unique identification, the ATCUD, the tax totals, the hash characters and the software certificate number. Each field has a letter code and fields are separated by asterisks.
Sources
- Portaria 195/2020 of 13 August, Diário da República (PDF, in Portuguese) files.diariodarepublica.pt
- Portal das Finanças, technical specifications of the QR code (PDF, in Portuguese) info.portaldasfinancas.gov.pt