Documentation Index
Fetch the complete documentation index at: https://invopop-kill-invoicexpress.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Introduction
Invopop, as a certified provider in Portugal, allows you to issue fully-compliant tax documents and report them to the Autoridade Tributรกria e Aduaneira (AT). Using the AT Portugal app, you can generate PDFs with the correct signatures, ATCUD and QR codes for all your documents (invoices, transport documents, payments, etc.). Also, you can report them to the AT either in batch, via periodic SAF-T PT reports, or in real-time, using the AT web services. This guide will walk you through the process of registering a supplier, issuing invoices in their name, and generating a SAF-T PT report.| - | Sandbox | Live |
|---|---|---|
| Supplier | Real company details required | Real company details required |
| Series type | F (Training) | N (Normal) |
Prerequisites
To issue invoices and other documents in Portugal, you will need:- Supplier details, including:
- Legal business name
- Tax ID
- Business address
- An email address for the supplier to access the Supplier Portal
- The supplierโs credentials to access the ATโs web services for registering series and report documents in real-time
- Document details:
- Line items with quantity, price, description
- Applicable VAT rates
- Any other details required for the specific document type
Setup
There are four key processes to prepare:- create a supplier post-registration workflow,
- connect the AT Portugal app,
- configure a supplier registration workflow, and,
- prepare a document processing workflow.
Connect the AT Portugal App
- Navigate to Configuration โ Apps.
- Find AT Portugal in the app discovery list.
- Click Connect to activate.
Create Supplier post-registration workflow
- Template
- Code
- Build from scratch
AT supplier post-registration workflow
Configure the AT Portugal App
- Navigate to Configuration โ Apps.
- Find AT Portugal in the connected apps list.
- Click Configure and choose the โPost-registration workflowโ we created in the previous step.
- Click the Save button.
Configure the supplier registration workflow
- Template
- Code
- Build from scratch
AT supplier registration workflow
Prepare the invoice processing workflow
- Template
- Code
- Build from scratch
AT issue invoice workflow
Prepare the invoice cancel workflow
- Template
- Code
- Build from scratch
AT cancel invoice workflow
Prepare the delivery processing workflow
- Template
- Code
- Build from scratch
AT issue delivery workflow
Prepare the delivery cancel workflow
- Template
- Code
- Build from scratch
AT cancel delivery workflow
Prepare the payment processing workflow
- Template
- Code
- Build from scratch
AT issue payment workflow
Running
In this section, weโll provide details on how to first persist and register a supplier, followed by issuing AT invoices and other documents on their behalf.Register a Supplier
Submit the Supplier Information
Obtain the Supplier's AT Credentials
- Go to the ATโs Portal das Finanรงas and click on the Iniciar Sessรฃo button.
- Authenticate by any of the available methods.
- Go to Todos os Serviรงos > Autenticaรงรฃo de Contribuintes > Gestรฃo de Utilizadores.
- Click on the Criar Novo Utilizador button.
- Fill in the form with the required information. We recommend setting a name that identifies the purpose of the user, for example โInvopop Userโ.
- Select the user permissions, depending on the supplier needs:
WSEโ Always required. It allows to register series for any document type.WFAโ Required if the supplier wants to submit invoices to the AT in real-time, rather than using SAF-T.WDTโ Required if the supplier wants to submit transport documents (e.g. โGuia de Remessaโ, โGuia de Transporteโ, etc.) to the AT in real-time, rather than using SAF-T.
- Click on the Submeter button to create the user.
- Store the username and password in a secure location, as they will be needed in the next step.
Provide the Supplier's AT Credentials and Register Series
- Go to the Invopop AT Portugal Supplier Portal
- Enter the email address provided in the supplierโs information. The system will send to the provided address a code to complete the authentication process.
- Once logged in, go to Credentials, enter the AT credentials obtained in the previous step, and press Save.
- Go to the Series section, click + Register and register at least a series for each document type that the supplier will issue.
Updating Supplier Data
After a supplier has been registered, you may need to update their information over time โ for example, a change of address. Keep in mind that supplier data is used in two different contexts:- SAF-T reports use the data stored in the Supplier Record. To have updated information appear in SAF-T reports, update the Supplier Record directly via the API or the Console. Re-running the registration workflow is not necessary for data-only changes.
- Printed PDFs use the supplier details included in each individual invoice, not from the Supplier Record. Make sure the invoice data is correct at the time of issuance.
Series Management
Series management in Portugal has specific requirements that differ from other countries. Understanding these particularities is essential for proper document issuance.Naming
All series names in Portugal must follow a specific format:- Document type prefix: The name must start with a code indicating the document type (e.g.,
FT,FS,FR,NCโฆ), followed by a space. - Base name: After the space, you can add any custom name you prefer. The custom name can contain letters, numbers, and most special characters, but not spaces, forward slashes (
/), or carets (^).
FT A001, NC 2024-01, FR INV-2024
When you register series through the Supplier Portal, youโre asked to provide a base name (without the document prefix) and select the document types you plan to issue. The portal combines each selected prefix with the base name, registers every resulting series with the AT, and retrieves the corresponding validation code required for generating ATCUD codes.
Sequence Assignment
Unlike other countries, Portugal regulations do not allow pre-assigning sequence numbers to documents. The sequence number (i.e., the documentโscode property) is automatically assigned during the Record for SAF-T reporting (Portugal) step in your workflow, following AT regulations. This is why youโll find no sequence step in Portugal workflow templates and you should not add one.
Series type
Every series registered with the AT has a type that determines its purpose. You must choose one of three types when registering a series, whether through the Supplier Portal or the API:| Type | Code | Description |
|---|---|---|
| Normal | N | The standard type for series used in production. Use this type for all real documents with fiscal effect in live workspaces. |
| Training (Formaรงรฃo) | F | For testing and training purposes only. Documents issued under a training series are fictitious and carry no fiscal effect. Use this type in sandbox workspaces when validating your integration before going live. |
| Recovery (Recuperaรงรฃo) | R | A special type for registering documents that were issued manually on paper during a system outage. Portuguese law requires that when the invoicing system is unavailable, issuers continue on paper and then re-enter those documents once the system is restored. This type covers that scenario. |
Send a document
The following examples show partial GOBL documents you can copy and paste directly into the Invopop Console or store via the API as silo entries. After uploading, you must run the corresponding processing workflow (invoice, delivery, or payment) created during setup.AT B2B invoice
AT B2B invoice
- the minimal version in the first tab contains only the essential fields required to create the invoice, without totals or calculations,
- the
pt-saft-v1addon ensures the document will be validated and normalized using the SAF-T PT v1 rules built into the GOBL library, - the
supplierandseriesfields are set to example values; youโll need to replace them with the details of supplier and series registered as per the previous sections. The series must be registered in the Supplier Portal and follow Portuguese naming conventions (see Series Management for details), - when running
gobl build, or uploading the file, the system automatically calculates totals, assigns thept-saft-invoice-typeextension toFT(Fatura), sets thept-saft-payment-meansextension toCCfor card payment, and applies thept-saft-tax-rateextension toNORfor standard VAT, - the built version in the second tab shows the normalized document with calculated totals, line item sums (including advance payment deductions), tax breakdowns, and automatically generated fields, and,
- the
hitem unit causes thept-saft-product-typeextension to be set toS(Serviรงo), and thept-regionextension is automatically set toPT.
AT delivery note
AT delivery note
- the first tab shows the minimal version containing only the essential fields required to create the delivery document; there are no totals or calculations,
- the
pt-saft-v1addon ensures the document will be validated and normalized using the SAF-T PT v1 rules built into the GOBL library, - the
supplierandseriesfields are set to example values; youโll need to replace them with the details of supplier and series registered as per the previous sections. The series must be registered in the Supplier Portal and follow Portuguese naming conventions (see Series Management for details), - this is an
notedocument type with thept-saft-movement-typeextension set toGR(Guia de Remessa), - when running
gobl build, or uploading the document, the system automatically calculates totals, applies the standard VAT rate with thept-saft-tax-rateextension set toNOR, and normalizes all fields, - the second tab shows the built version of the document with the calculated totals, line item sums, tax breakdowns, and automatically generated fields, and,delivery
- the
pt-regionextension is automatically set toPT.
AT payment receipt
AT payment receipt
- the minimal version in the first tab contains only the essential fields required to create the payment document, without totals or calculations,
- the
pt-saft-v1addon ensures the document will be validated and normalized using the SAF-T PT v1 rules built into the GOBL library, - the
supplierandseriesfields are set to example values; youโll need to replace them with the details of supplier and series registered as per the previous sections. The series must be registered in the Supplier Portal and follow Portuguese naming conventions (see Series Management for details), - this is a
receiptpayment with the method set tocash, which causes GOBL to automatically assign thept-saft-payment-meansextension toNU(Numerรกrio), - when running
gobl build, or uploading the document, the system automatically assigns thept-saft-payment-typeextension toRGand thept-saft-sourceextension toP, - the built version in the second tab shows the normalized document with all automatically generated fields and extensions properly set,
- the payment lines reference the original invoice document being paid, and,
Cancel a document
If you need to cancel a document that has already been issued and reported to the AT, you can use the cancel workflows created during setup. The cancellation process follows the same pattern as sending a document: create a job for the silo entry you want to cancel using the cancel workflow appropriate for the document type.Reporting documents to the AT
The AT Portugal app supports two methods for reporting documents to the Autoridade Tributรกria e Aduaneira:- Real-time reporting - Documents are submitted individually to the AT immediately upon issuance via webservice
- SAF-T PT reporting - Documents are reported in batch format through periodic SAF-T PT reports
Real-time Reporting
The Send to the AT (Portugal) step uses the ATโs webservice to submit each document to the tax authority immediately after it is recorded. This step is optional. If you prefer to report documents only via SAF-T PT reports, you can remove it from your workflows.WSA for invoices, WDT for transport documents) as described in the โObtain the Supplierโs AT Credentialsโ section above.SAF-T PT Reporting
SAF-T PT reports allow you to submit documents to the AT in batch format. The Record for SAF-T reporting (Portugal) step takes care of recording the documents for this purpose.- Go to the Invopop AT Portugal Supplier Portal
- Log in using the email address provided with the supplierโs information
- Go to the SAF-T PT section, enter a date range and click Generate
๐ต๐น Invopop resources for Portugal
๐ต๐น Invopop resources for Portugal
| Compliance | Compliance timeline |
| Apps | |
| Guides | AT Portugal Guide |
| FAQ | Portugal FAQ |
| GOBL |