IRS filing season is open. File your IRS for free (early access) →
descodify
← Back to blog

Why every Portuguese invoice has a QR code

By Mikael

The first time I bought a coffee in Lisbon as a registered freelancer, the little slip the café printed had a QR code at the bottom, something I had never seen in Sweden. I assumed it was a loyalty code. It was not. That slip was a simplified invoice (fatura simplificada), and in Portugal even a one-euro coffee comes on a real invoice, QR code and all. Same at the hardware store. Same on the invoice from my accountant. Every single one.

I ignored it for months. Then a client asked me to send an invoice "with the QR." I looked it up, realized how deep the system goes, and started explaining it to every expat who had just registered their activity and was trying to figure out why their invoicing tool from back home wouldn't work here.

This is that explanation, written properly.

The QR code is just the visible part

The code itself is generated per Portaria 195/2020 and has been mandatory on all Portuguese invoices since 1 January 2022. Scan it and you get a structured text string, not a URL. It contains:

  • The issuer's NIF and the buyer's NIF (or the anonymous placeholder 999999990 if no NIF was given)
  • The buyer's country
  • The document type (FT for a standard invoice, FR for an invoice-receipt, NC for a credit note, and so on)
  • The document status (normal or cancelled)
  • The document date and number
  • The ATCUD unique document code
  • A breakdown of the taxable amounts and VAT by rate (reduced, intermediate, normal) and by territory (mainland, Madeira, Azores)
  • The gross total and any withholding tax
  • A 4-character excerpt of the document's cryptographic hash chain
  • The AT software certificate number

That last field is the tell. The QR code proves the invoice was produced by AT-certified software. The hash chain proves the document hasn't been altered. The ATCUD ties it to a series registered with the tax authority. Three separate verification mechanisms, all visible in a code you can scan on your phone.

What is ATCUD, and why does it matter

ATCUD stands for Código Único de Documento da AT. Every invoice series (invoices, receipts, credit notes) must be registered with the tax authority before any documents are issued. That registration returns a validation code. The ATCUD on each document combines that code with the document's sequential number.

So ABCD1234-7 means: document number 7 in the series identified by the validation code ABCD1234. The AT issued that code. The sequential number cannot be skipped or reused without creating a detectable gap.

ATCUD became mandatory on 1 January 2023, one year after the QR code requirement. Before 2023, you could issue a QR code without a valid ATCUD inside it. After 2023, both are required, and both must come from AT-certified software.

For a deeper look at the code itself, including how series registration works, see the ATCUD glossary entry.

Why every invoice must come from AT-certified software

The QR code and ATCUD aren't things you add manually. They require software that:

  1. Registers your invoice series with the AT via a webservice and receives validation codes
  2. Assigns sequential document numbers without gaps or duplications
  3. Generates the QR code per the AT technical specification
  4. Communicates invoice data to the AT, either in real time or by the 12th of the following month
  5. Generates the SAF-T (PT) audit file covering all your invoicing activity

This is what AT certification means in practice. The AT maintains a list of certified software providers. Descodify is on it. So are Moloni, InvoiceXpress, Primavera, and a handful of others. International tools like Stripe Invoicing, QuickBooks, FreshBooks, and Xero are not on the list and cannot produce compliant Portuguese invoices.

The AT portal itself is certified and free. You can issue all your documents there at no cost. What certified third-party software adds is a better interface, automatic client records, and the ability to track everything without logging into the portal for each invoice.

SAF-T: the file running in the background

SAF-T (PT) is a standardized XML file that contains your complete invoicing record for a period. Portugal adopted the OECD SAF-T standard with its own schema (SAF-T (PT)) and made it part of the certification requirement for invoicing software. Portugal was one of the early adopters of SAF-T in Europe, with the standard introduced in 2008 and invoicing communication requirements built out from 2010-2011 onward.

For most simplified-regime freelancers, SAF-T is invisible. Your certified software generates and communicates it automatically. Where it becomes visible is in two situations: if the AT ever audits you and requests the file, or if you switch invoicing software and need to migrate your invoice history to the new system.

There is also a SAF-T contabilidade format, which covers full accounting entries. That one has been deferred and the first submission (covering 2026) will be due in 2028. For simplified-regime freelancers with no organized accounting, it is not relevant.

eFatura: the consumer-facing side

The system described above covers invoices you issue. But Portugal built something equally significant on the consumer side.

When you give your NIF at a shop, café, pharmacy, or any Portuguese merchant, that transaction is reported through the merchant's certified software and lands in your e-Fatura account on Portal das Finanças. The AT uses those records to pre-fill your IRS deductions. Health, education, restaurant meals, fuel, home repair: all of it tracked automatically, deductions calculated for you, flowing into your Modelo 3 filing.

For freelancers on the simplified regime, eFatura does double duty. Personal purchases (health, education) feed into Anexo H deductions. Business purchases where you give your NIF as a professional also count toward the 15% documented expense requirement under the simplified regime.

This is the part that genuinely surprises people who come from other countries. In most of Europe, tracking deductible expenses means keeping a folder of receipts, reconciling them manually, and hoping you didn't miss anything. In Portugal, if you gave your NIF, the AT already has the record.

For a full walkthrough of how to read your eFatura statement, categorize pending expenses, and handle the February review window, see eFatura: How to Read Your Expense Statement.

What the EU is only now requiring

Most EU member states have no equivalent of this system. The EU's ViDA (VAT in the Digital Age) package, adopted on 11 March 2025, mandates structured e-invoicing for intra-EU B2B transactions from 1 July 2030. Individual member states are on different schedules: Belgium from January 2026, France from September 2026, Germany from January 2028 for all businesses. Many are still in planning phases.

Portugal has not been waiting for ViDA. The requirements have been building since 2008 (SAF-T adoption), through 2010-2011 (certified software mandatory), 2022 (QR codes on all invoices), and 2023 (ATCUD mandatory). The consumer-side eFatura system, where your purchases are tracked against your NIF and flow into your IRS return automatically, has been running for years.

Worth being clear about what Portugal has and what it doesn't. Portugal does not operate a centralized clearance platform where every invoice is pre-approved before the buyer receives it (Italy's SDI does this). What Portugal has is a post-issuance reporting model: the invoice is issued by certified software, delivered to the buyer through whatever channel works, and the data is communicated to the AT afterward. It is a different design, not necessarily better or worse than clearance, but it has been running at scale for over a decade while the EU was still drafting the framework.

The result, from a freelancer's perspective: if you are used to invoicing in Sweden, Germany, or the UK, the Portuguese system looks unusually sophisticated. The QR code is not decoration. The ATCUD is not bureaucracy for its own sake. They are the visible surface of an infrastructure that has been auditing, cross-referencing, and pre-filling tax returns automatically for years.

What this means when you are setting up as a freelancer

The practical consequence is that your invoicing software choice is not optional in the way it might be elsewhere. You need AT-certified software. Your tool must register series, generate ATCUDs, produce QR codes, and communicate data to the AT. If it cannot do all of those things, the invoices it produces are not legally valid.

That is the certification gate most expats hit within their first month. Your existing tool from home, however good it is, is probably not on the AT certification list.

The buyer's guide to certified invoicing software covers the main options and how to choose between them. For the current status of PDF invoices and the QES (qualified electronic signature) requirement that comes into force in January 2027, see PDF Invoices in Portugal in 2026.

The invoice types fact page covers the different document prefixes (FT, FR, FS, NC, ND, RG) and when each one is used.

Descodify handles invoicing, VAT, and IRS reporting so you can focus on your work.

Try Descodify free

Working for yourself in Portugal - monthly

Invoicing, VAT, Social Security, expenses, and tax, explained simply. One email a month.