Guides · August 28, 2026 · By João Pereira, Founder, Build Up Labs · Updated August 28, 2026 · 8 min
ATCUD and QR Codes: Why Stripe Does Not Generate Them
The ATCUD identifies the fiscal document series and number, while the QR code contains data defined by the Portuguese Tax Authority. Learn how they are created, when they became mandatory, and why a Stripe receipt does not include them.
ATCUD identifies each document through the series reported to the Portuguese Tax Authority and its sequential number. The QR code encodes tax data from the document in a machine-readable format. They are not the same thing, do not replace the invoice, and are not generated by a Stripe payment alone.
What is ATCUD on a Portuguese invoice?
ATCUD means “unique document code”. Ordinance 195/2020 defines it as the combination of the validation code assigned by the Tax Authority to a document series and the document's sequential number within that series. A hyphen separates the two elements, and the printed wording follows the format ATCUD:ValidationCode-SequentialNumber.
The validation code belongs to the series and contains at least eight characters. The number that follows belongs to the document. If an invoice series had the fictional code AB12CD34 and the invoice were document 417 in that series, the visual example would be ATCUD:AB12CD34-417. This example explains the composition; it is not a code issued or validated by the Tax Authority.
The combination matters. The Tax Authority explains that the code is specific to each pairing of a series identifier and document type. Using the identifier “WEB2026” for invoices and credit notes requires separate reports and produces separate validation codes. The same code cannot be moved to a new series or used to restart a sequence.
What does a Portuguese invoice QR code contain?
The QR code is a two-dimensional representation of tax fields from the document. The Tax Authority specification includes, among other data, the supplier's NIF, the customer's tax identifier and country, document type and status, date, unique identification, ATCUD, totals by tax jurisdiction and rate, total tax, and the document total.
The message also provides for four characters from the hash, the software certificate number, and an optional field for other information. Taxable values and VAT are aggregated by rate rather than repeated line by line. The QR is therefore not a photograph of everything written on the invoice. It is a structured message using fields, order, separators, and formats defined by the Tax Authority.
The specification sets legibility requirements, including a minimum image size of 30 by 30 millimetres. The QR must be visible on the first or last page. On a multi-page document, ATCUD appears on every page; on the page containing the QR, it sits immediately above it. Shrinking the code until it cannot be read defeats its required function.
What is the difference between ATCUD and a QR code?
| Element | What it identifies or contains | How it is obtained |
|---|---|---|
| ATCUD | Validated series code and sequential document number | The Tax Authority assigns the series code; the system appends the document number |
| QR code | A structured set of tax data for that document | Certified software generates the message under the Tax Authority specification |
| Invoice number | Type, series, and sequence, for example FT WEB2026/417 | The invoicing method maintains the series' progressive numbering |
Reading a QR retrieves the encoded fields, but it does not turn the graphic into standalone proof that every obligation was met. Likewise, recognising an ATCUD format does not by itself confirm that the series belongs to the supplier. Operational validation should compare the document with the reported series, the sequence maintained by the system, and the records available in the Finance Portal.
Since when have QR codes and ATCUD been mandatory?
Ordinance 195/2020 entered into force on 1 January 2021, but the ordinance's commencement must not be confused with the effective start of every obligation. Article 404 of Law 75-B/2020 suspended the QR and ATCUD requirements during 2021. The QR code therefore became mandatory on 1 January 2022 for covered documents issued by certified software.
The ATCUD timetable had one further step. Order 351/2021-XXII suspended series reporting and the inclusion of ATCUD during 2022, keeping it optional that year. The Tax Authority's current FAQ confirms that series could be prepared in 2022 to issue documents with ATCUD from 1 January 2023. Since that date, a series must be reported before use.
Their scope also differs. ATCUD must appear on invoices and other tax-relevant documents issued through the processing methods allowed by law, including documents pre-printed by an authorised printer. The QR is required on documents issued by invoicing software certified by the Tax Authority. The Authority's FAQ confirms that pre-printed documents do not need a QR, although they must include ATCUD.
How is a series validation code obtained?
Define the series before its first document is issued. The report identifies the processing method, series identifier, document type, starting sequential number, and intended start date.
Report the series to the Tax Authority. This can be done in the Finance Portal or through the service provided for software integration. An FT invoice series and an NC credit-note series are treated as different combinations even if their identifiers use the same text.
Receive the validation code. According to the Tax Authority FAQ, it is available immediately after the series is reported. The code must be associated with the series in the software or other electronic method before documents are issued from that series.
Check the first issue. Verify the document type, series, sequence, complete ATCUD and, where applicable, the presence and legibility of the QR. Merely storing the validation code in a free-text field does not complete this configuration.
A business issuing directly through the Tax Authority's invoicing applications does not need to repeat this process manually. The Authority's FAQ says that reporting is automatic in this case, with the series validation code assigned and ATCUD included.
What does an invoice with ATCUD and a QR code look like?
Consider a fictional FT for a subscription, issued from series WEB2026. The following annotation shows the role of each element without trying to reproduce a complete invoice design or generate a real tax code.
| Document area | Illustrative example | What to check |
|---|---|---|
| Identification | FT WEB2026/417 | Type, series, and sequential number match the record |
| ATCUD | ATCUD:AB12CD34-417 | The suffix matches the invoice's sequential number |
| QR code | Legible image on the first or last page | The encoded data matches the document issued |
| Tax details | Supplier, customer, date, lines, taxes, and totals | The applicable details appear and are internally consistent |
This example also shows why an ATCUD should not be “corrected” in a PDF editor. The identifier originates from the series and sequence used at the time of issue. The Tax Authority FAQ explains that a duplicate must preserve the original content. A material error may require cancellation, where still permitted, or a correcting document and a new issue.
How can an ATCUD be validated beyond its appearance?
Read the complete ATCUD and separate the validation code from the sequential number. Confirm that the latter matches the number after the slash in the document's unique identification.
Check the supplier's series records to confirm that the code was assigned to that identifier and that document type. A similar appearance or eight random characters is not enough.
Read the QR and compare its key data with the invoice, including supplier, customer, date, identification, ATCUD, and totals. A difference should be investigated in the invoicing software.
The QR also helps a consumer report an invoice to the Tax Authority when they choose to do so. That facility neither removes the supplier's controls nor proves on its own that the document has already been reported. The presence of the codes, correct issuance, and reporting of document data are related but separate checks.
Why does Stripe not generate Portuguese ATCUD or QR codes?
A Stripe payment identifier belongs to the payment process. ATCUD depends on a code that the Tax Authority assigns to a specific document series and on the sequential number used in that series. The QR, in turn, is generated by certified software from the final tax document, including fields that do not exist merely because a payment occurred.
For example, payment pi_123 may fund the issue of FT WEB2026/417, but it does not determine the correct series, assign its validation code, or maintain the legal sequence. The invoicing system issues the document; Stripe supplies commercial data and confirms payment. The identifiers should be linked for reconciliation without being treated as equivalents.
The guide answering whether a Stripe invoice is valid in Portugal develops this distinction. To set up the complete workflow, see how to automate Stripe invoicing in Portugal. The general list of document types and required details is in the guide to Portuguese invoice requirements.
Frequently asked questions
What does ATCUD mean?
ATCUD means unique document code. It combines the validation code assigned by the Portuguese Tax Authority to the series and the document's sequential number within that series, separated by a hyphen.
When did the QR code and ATCUD become mandatory?
For fiscally relevant documents issued by certified software, the QR code became mandatory on 1 January 2022 and the ATCUD on 1 January 2023. Confirm the exact scope for the issuing method used.
Does Stripe generate the Portuguese ATCUD and QR code?
No. Stripe processes payments and provides billing invoices and receipts, but it does not register Portuguese series with the Tax Authority or issue the fiscal document through Portuguese certified software. Those elements belong to the invoicing system.
Can the same validation code be used for several document types?
A series registration identifies the document type, series, starting number, and processing method. A relevant change requires a series registered under the Tax Authority's rules; a code must not be reused outside its validated series.
Do pre-printed documents need a QR code?
No. The Portuguese Tax Authority distinguishes documents issued by certified software from documents pre-printed by an authorised printer. The duties and ATCUD representation depend on the issuing method; confirm the applicable rule before printing or using the series.
Sources
Automate Stripe invoicing with Faturado
Connect Stripe, TOConline, or InvoiceXpress and validate the flow with usage-based pricing.