ediverse Explore the platform

Spotlight PEPPOL BIS Billing 3.0 The EU e-invoicing mandate is here — France Sept 2026, Belgium Jan 2026, Germany 2025.

Portugal — ATCUD QR Code, SAF-T PT, e-Fatura

Portugal is the world pioneer of modern Continuous Transaction Controls. From 1 January 2008 the Autoridade Tributária e Aduaneira (AT) imposed the monthly SAF-T PT (Standard Audit File for Tax) on every VAT taxpayer — the world's first monthly application of the OECD standard. Since 1 January 2023 each invoice also carries an ATCUD (Código Único de Documento) and a QR Code v1.0.4 conforming to the AT spec. More than 99% of B2B transactions are already structurally electronic.

Regulatory timeline

  • 1 January 2008 — SAF-T PT v1.01. Portugal publishes the first version of the Portuguese Standard Audit File for Tax under Portaria 321-A/2007 of 26 March 2007. The world's first SAF-T applied as a monthly filing to taxpayers: the Autoridade Tributária e Aduaneira (AT) receives every month the full bookkeeping and fiscal records of all VAT-registered businesses.
  • 1 May 2013 — Certified invoicing software. Portaria 363/2010: every invoice issued in Portugal must come from software that holds an AT certification number (header line "Processado por programa certificado n.º XXXX/AT").
  • 2014 — e-Fatura. The portaldasfinancas.gov.pt/e-fatura platform consolidates consumer-side digitised invoices with the buyer's NIF (Número de Identificação Fiscal) entered: automated reconciliation for IRS "benefícios fiscais" deductions (health, restaurants, hairdressers, mechanics, transport).
  • 4 August 2020 — Portaria 195/2020. Official introduction of the ATCUD (Código Único de Documento) and the QR Code on invoices. Effective date postponed three times (COVID-19, technical fine-tuning of AT specs).
  • 1 January 2023 — ATCUD + QR Code mandatory. Every invoice, transport document or receipt must carry the ATCUD (sequence code-validation-number) and a QR Code that conforms to AT spec version 1.0.4. Despacho 412/2020-XXII.
  • 1 January 2025 — Mandatory B2G (all categories). Decreto-Lei 28/2019 and Decreto-Lei 123/2018: electronic invoices to public administration transit through the FE-AP (Faturação Eletrónica na Administração Pública) platform in CIUS-PT (EN 16931 customisation) over UBL 2.1.
  • 2026-2027 — Universal B2B trajectory. No universal B2B mandate to date: monthly SAF-T PT and ATCUD/QR Code already cover most CTC needs. Portugal aligns with ViDA for 2030 without anticipating a national deployment.

Deep dives — 10 dedicated pages

Ten dedicated pages drill into every dimension of the Portuguese e-invoicing ecosystem — the pioneering reforms that made Portugal a world record-holder (SAF-T 2008, software certification 2010, ATCUD + QR 2023, e-fatura 2013, ViDA readiness), the technical specifications (FE-AP / CIUS-PT B2G, NIF, IVA regimes), and the real-world B2B usage that long pre-dates and coexists with EU regulation (retail and industrial EDIFACT).

Pioneering reforms

Technical specs

  • B2G — FE-AP, eSPap and CIUS-PT · B2G invoicing via FE-AP operated by eSPap (DL 123/2018, Directive 2014/55/EU). EN 16931-compliant CIUS-PT profile, UBL 2.1 / CEFACT CII formats, central access point, phased roll-out toward 2025.
  • NIF — 9-digit tax identifier · Número de Identificação Fiscal: 9 digits, modulo-11 check digit, category prefixes, PT prefix for intra-EU VAT, PEPPOL ICD 9946. Pivot of SAF-T, e-fatura and ATCUD.
  • VAT (IVA) regimes — 23 / 13 / 6%, Azores and Madeira · Mainland IVA 23/13/6%, reduced rates Azores (16/9/4%) and Madeira (22/12/5%), reverse charge. SAF-T codes NOR/INT/RED/ISE, PT/PT-AC/PT-MA tax spaces in the QR code. Basis: CIVA (DL 394-B/84).

Real-world B2B usage

Technical schema

The Portuguese scheme combines three complementary technical layers: SAF-T PT (declarative monthly), ATCUD/QR Code (per-invoice instrumentation), CIUS-PT/UBL (B2G exchange).

  • SAF-T PT (Standard Audit File for Tax — Portugal) — XML schema SAF-T(PT) version 1.04_01, based on OECD SAF-T 2.0. Mandatory monthly filing to the AT for every VAT taxpayer since 2008: General Ledger Entries, Customer Master Files, Supplier Master Files, Sales Invoices, Movement of Goods, Working Documents, Payments.
  • ATCUD (Código Único de Documento): unique per-document identifier in the form <validation-code>-<sequential-number>. The validation code (8 characters) is obtained beforehand from the AT e-Series web service.
  • QR Code v1.0.4: text payload with fields A-Z covering issuer NIF, country, type, status, date, ATCUD, fiscal space, VAT totals per rate, hash signature (characters 1, 11, 21, 31 of the SHA-1 base64 hash of the SAF-T InvoiceNo record), certified software version.
  • CIUS-PT (B2G): EN 16931 profile on UBL 2.1 published by eSPap (Entidade de Serviços Partilhados da Administração Pública). PEPPOL identifier code 9946 for PT:VAT.
xmlpt-saftpt-snippet.xml
<?xml version="1.0" encoding="UTF-8"?>
<AuditFile xmlns="urn:OECD:StandardAuditFile-Tax:PT_1.04_01">
  <Header>
    <AuditFileVersion>1.04_01</AuditFileVersion>
    <CompanyID>123456789</CompanyID>
    <TaxRegistrationNumber>123456789</TaxRegistrationNumber>
    <TaxAccountingBasis>F</TaxAccountingBasis>
    <CompanyName>Ediverse Demo Portugal Lda</CompanyName>
    <FiscalYear>2026</FiscalYear>
    <StartDate>2026-05-01</StartDate>
    <EndDate>2026-05-31</EndDate>
    <CurrencyCode>EUR</CurrencyCode>
    <DateCreated>2026-06-15</DateCreated>
    <ProductCompanyTaxID>500000000</ProductCompanyTaxID>
    <SoftwareCertificateNumber>3142</SoftwareCertificateNumber>
    <ProductID>EdiverseFinance/Ediverse Lda</ProductID>
    <ProductVersion>2026.05</ProductVersion>
  </Header>
  <SourceDocuments>
    <SalesInvoices>
      <Invoice>
        <InvoiceNo>FT 2026/142</InvoiceNo>
        <ATCUD>JFCT3-142</ATCUD>
        <Hash>X9aB</Hash>
        <Period>5</Period>
        <InvoiceDate>2026-05-19</InvoiceDate>
        <InvoiceType>FT</InvoiceType>
        <DocumentStatus>
          <InvoiceStatus>N</InvoiceStatus>
        </DocumentStatus>
      </Invoice>
    </SalesInvoices>
  </SourceDocuments>
</AuditFile>

QR Code payload example (raw text, fields separated by *):

textpt-qrcode-payload.txt
A:123456789*B:999999990*C:PT*D:FT*E:N*F:20260519*G:FT 2026/142*H:JFCT3-142
*I1:PT*I7:200.00*I8:46.00*N:46.00*O:246.00*Q:X9aB*R:3142

Submission flow

Portugal does not run a per-invoice clearance model like Italy or Poland: submission is declarative monthly via SAF-T PT, complemented by per-invoice instrumentation (ATCUD + QR Code). CTC control happens post-fact by reconciling supplier and customer SAF-T using the NIF embedded in the QR Code on B2C invoices.

textpt-saftpt-flow.txt
┌──────────────┐    ┌──────────────────┐    ┌──────────────┐    ┌──────────────┐
│ Seller PT    │──> │ Certified SW     │──> │ AT           │<── │ Buyer PT     │
│ (ERP/POS)    │    │ + ATCUD/QR Code  │    │ portaldas    │    │ (NIF input)  │
└──────┬───────┘    └─────────┬────────┘    │ financas.gov │    └──────┬───────┘
       │                      │             │ .pt/e-fatura │           │
       │ (SAF-T PT monthly)   │             └──────────────┘           │
       └──────────────────────┴─────────────────────────────────────────┘

For B2G the chain differs: mandatory routing through FE-AP (eSPap) in CIUS-PT UBL 2.1 via PEPPOL or direct EDI. Suppliers without integration may use the FE-AP web portal as fallback. More than 99% of B2B transactions in Portugal are already structurally electronic through SAF-T PT — it is the oldest ergonomically integrated CTC scheme in the world.

Validation

  • AT portal — Portal das Finanças: portaldasfinancas.gov.pt — SAF-T PT submission, ATCUD e-Series web service, e-Fatura consultation.
  • Official ATCUD + QR Code documentation: info.portaldasfinancas.gov.pt — ATCUD and Despacho 412/2020-XXII, QR Code spec v1.0.4.
  • SAF-T PT schemas: XSD SAFTPT_1.04_01.xsd published by AT, code lists from Portaria 363/2010, validated examples.
  • FE-AP (B2G): espap.gov.pt — FE-AP — B2G submission portal, CIUS-PT profile, PEPPOL hook.
  • PEPPOL validator: peppol.helger.com for cross-border UBL flows.

Common pitfalls

  1. Hash signature (QR Code field Q). Field Q does not hold the full hash: it carries the characters at positions 1, 11, 21 and 31 of the SHA-1 base64 hash computed on the invoice SAF-T record, plus a 0 character if the invoice reverses a signature cycle. Vendors that take the first 4 characters of the hash produce QR Codes that fail at the AT scan.
  2. e-Series web service mandatory. ATCUD cannot be generated locally: every document series (FT, NC, ND, etc.) must be registered with the AT e-Series web service ahead of the first issuance. The sequence must be strictly monotonic: any gap triggers an AT investigation.
  3. UTF-8 without BOM. AT rejects SAF-T PT files with a UTF-8 BOM (EF BB BF bytes at the start). Excel or Notepad Windows exports add the BOM by default.
  4. VAT in Madeira and Azores. The autonomous regions have specific rates: Madeira 4% / 9% / 22%, Azores 4% / 9% / 16%, vs the mainland 6% / 13% / 23%. The TaxCountryRegion code must equal PT-MA (Madeira), PT-AC (Azores) or PT (mainland). Wrong-region rate = VAT return rejection.
  5. Software Certificate Number. Every invoicing software used in Portugal must hold an AT certification number recorded in the SoftwareCertificateNumber SAF-T field and printed on every invoice. Non-certified foreign software (SAP, Oracle, NetSuite without the local patch) cannot legally issue a Portuguese invoice for a PT VAT taxpayer.