Skip to main content

Receipt Printing

In Portugal, the printed or electronically delivered document is the fiscal document. The Middleware does not print; it numbers and signs the document and returns everything that must appear on it in the ftSignatures of the response. The POS system is responsible for rendering a layout that contains all mandatory elements, or for handing out the digital receipt rendered by fiskaltrust.

The requirements below follow Portaria n.º 363/2010 (art. 6), Despacho n.º 8632/2014, and Portaria n.º 195/2020 (QR code). They were verified during the certification of the fiskaltrust.CloudCashBox and apply to every document type the Middleware issues.

Digital receipt

The QR code signature item carries in its Caption the URL of the digital receipt rendered by fiskaltrust (https://receipts.fiskaltrust.eu/{ftQueueID}/{ftQueueItemID}, or the receipts-sandbox host in the sandbox). This rendering already contains all mandatory elements, including copy and void markers. PosCreators who print their own layout must follow the rules on this page.

Mandatory content of a document

Every fiscal document (FS, FT, NC, RG, PF, OR, CM) must contain the following elements. Values must be exactly the same as those exported to the SAF-T (PT); the Middleware exports what it received in the request, so print what you sent.

ElementSourceNotes
Issuer headerPOS master dataCompany name, address, and NIF of the issuer.
Document type designationDocument identifierPrint the Portuguese designation of the type contained in ftReceiptIdentification: Fatura (FT), Fatura simplificada (FS), Nota de crédito (NC), Recibo (RG), Fatura pró-forma (PF), Orçamento (OR), Consulta de mesa (CM).
Document numberftReceiptIdentificationThe part after the #, e.g. FS ft20257d14/12 (type code, series, sequential number). Print it unchanged.
ATCUDSignature item ATCUDATCUD: <validation code>-<number>. Must be printed on every page.
Date and timecbReceiptMomentFormat YYYY-MM-DD HH:MM, in Portuguese local time.
OperatorcbUserThe user who issued the document.
CustomercbCustomerName, address, and NIF when provided. Without a NIF the Middleware returns the text Consumidor final, which must be printed instead.
Original / copy markerPOSOriginal on the first print, Duplicado (or 2.ª via) on every reprint. A copy must reproduce the original exactly, whatever has changed in master data since.
Void markerPOSA voided document, when printed, must visibly state Documento anulado and still show its ATCUD and QR code.
Line itemscbChargeItemsQuantity, description, unit price without VAT, VAT rate, line discount, line total. For 0 % lines the exemption reason (code and text) must be printed.
DiscountscbChargeItemsLine discounts per line; document totals of discounts. Amounts are printed as absolute values, never negative.
Document totalRequestTotal with VAT. Credit notes show absolute values as well.
VAT summaryRequestOne line per VAT rate: designation (Isento, Reduzida, Intermédia, Normal), percentage, taxable base, VAT amount, gross amount.
IVA incluídoSignature item PTAdditionalReturned when prices are gross; must be printed.
PaymentscbPayItemsPayment method and amount. Simplified invoices always contain a payment; working documents never do.
Reference to source documentSignature items ReferenceForCreditNote / PTAdditionalReferencia: or Origem: followed by the referenced document number, and Razão: Devolução on credit notes. Must be printed whenever returned.
Working-document noticeSignature item PTAdditionalEste documento não serve de fatura on PF, OR, and CM. Must be printed.
Manual-document noticeSignature item PTAdditionalCópia do documento original - FTM <series>/<number> on recovered handwritten invoices.
Hash and certificate lineSignature item CertificationNo<4 hash characters> - Processado por programa certificado n.º 3535/AT. The four characters are positions 1, 11, 21, and 31 of the document hash. Print exactly as returned.
QR codeSignature item PosReceipt (format QR code)Render the Data as a QR code, readable within the body of the document.

Additional layout rules:

  • Language. Documents for domestic operations must be in Portuguese. A bilingual layout is allowed; a layout exclusively in a foreign language is not.
  • No negative amounts. Quantities, prices, discounts, and totals are printed as absolute values, also on credit notes and returns.
  • Footer. None of the mandatory elements may be the last item on the document; print a footer (e.g. a thank-you line) after them. Free text is allowed as long as it cannot be mistaken for a mandatory element.
  • Multi-page documents. Every page must show the document type, the document number, the ATCUD, and Página n de N. The first and middle pages end with A transportar: <amount>, the following pages start with Transportado: <amount>. Totals and the VAT summary appear on the last page only.
  • Simplified invoice. In addition to the elements above, a simplified invoice shows the customer NIF only if provided. It may not exceed a net amount of 100 EUR (see Certification).

Signature items returned by the Middleware

The Middleware returns the following Portugal-specific signature items. The ftSignatureType values are listed in the Type of Signature: ftSignatureType reference table.

Signature type (sss)CaptionDataFormatPrint
001 PosReceiptURL of the digital receiptQR code content (Portaria n.º 195/2020)QR codeMandatory as QR code. The caption may be printed as a link.
010 ATCUD(empty)ATCUD: AAJFJNK6JJ-12TextMandatory on every page.
012 HashHashFull document hashText, flagged Do not printNot printed. Kept for audit; the four print characters are in 014.
014 CertificationNo-----Rsur - Processado por programa certificado n.º 3535/ATTextMandatory.
015 ReferenceForCreditNote(empty) or Referencia <document>Referencia: <document> / Razão: DevoluçãoTextMandatory when returned (invoices from working documents, credit notes).
016 PTAdditional(empty)IVA incluido, Consumidor final, Origem: <document>, Este documento não serve de fatura, Cópia do documento original - FTM <series>/<number>TextMandatory when returned.
1 001 InitialOperationReceiptInitial-operation receiptQueue-ID: <id>TextLifecycle receipt; keep with the bookkeeping records.
1 002 OutOfOperationReceiptOut-of-operation receiptQueue-ID: <id>TextLifecycle receipt; keep with the bookkeeping records.

The recommended print order is: header, document type and number, date/time, operator, customer, line items, totals and VAT summary, payments, then all returned text signature items in the order returned, the QR code, and the footer. A signature item whose ftSignatureType carries the Do not print flag (0x0020) must not be visualized.

Copies, voids, and manual documents

  • Copy of an existing document. Send ftReceiptCase 0x3010 with cbPreviousReceiptReference set to the original. Print the original content unchanged and mark the document Duplicado. Copies are supported for FS, FT, RG, PF, OR, and CM.
  • Void. A void (IsVoid flag 0x0004) does not create a new document number. If the voided document is printed again, it must state Documento anulado and still contain the original ATCUD, QR code, and certificate line.
  • Credit notes. The credit note references the original document (Referencia / Razão: Devolução). All amounts are printed as absolute values; only the document type Nota de crédito indicates the direction.
  • Recovered handwritten documents. An invoice sent with the Handwritten flag (0x0008) is issued in the dedicated manual series and carries the Cópia do documento original - FTM <series>/<number> notice, which must be printed together with the regular elements.

Checklist for PosCreators

Before going live, verify one printed sample of every document type against this list:

  1. Document type designation and number as returned in ftReceiptIdentification.
  2. ATCUD on every page.
  3. Hash characters and certificate line exactly as returned.
  4. QR code rendered from the Data of the QR signature item and readable.
  5. IVA incluído, Consumidor final, references, and the working-document notice printed whenever returned.
  6. Exemption reason printed for every 0 % line.
  7. No negative values anywhere; VAT summary per rate present.
  8. Original / Duplicado / Documento anulado markers implemented.
  9. Multi-page rule (A transportar / Transportado, page numbers) implemented.
  10. Footer after the last mandatory element.