Overview
The legal invoice in KSeF is the structured FA(3) XML, and the UPO together with the KSeF number are your proof that it was accepted. KSeF keeps the structured invoices it stores for 10 years, so you can retrieve them while your access lasts; locally you should archive the XML, the UPO and the KSeF number together. Treat the PDF as a readable copy for people, not as the document of record.
What the legal record is
KSeF (Krajowy System e-Faktur) is Poland's national e-invoicing platform run by the Ministry of Finance. When KSeF accepts a submitted invoice, it assigns the invoice a unique KSeF number and issues the UPO (Urzędowe Poświadczenie Odbioru), the official proof of receipt, which is a separate XML document. The invoice itself is the structured FA(3) XML document, not a PDF or a printout. That XML, together with the UPO and the KSeF number, is what you point to when you need to prove the document was issued through KSeF.
What KSeF stores for you
KSeF keeps the structured invoices it holds for 10 years. While your authorisation lasts, you can retrieve an invoice from the system by its KSeF number, so KSeF is effectively the authoritative archive and a lost local file is usually recoverable. Still, do not treat that as a substitute for your own books: keep the data you need for reconciliation, reporting and audit, and confirm the retention period that applies to your records with your accountant.
What to archive locally
Store three things together for every accepted invoice: the FA(3) XML, the UPO and the KSeF number. In the Notaly API they come from different places. The invoice.accepted webhook carries the KSeF number, and the UPO if KSeF has already issued it. The webhook does not carry the XML: download the exact XML sent to KSeF with GET /invoices/{id}/xml. If the UPO arrives after acceptance, Notaly stores it and you read it from the upo field of GET /invoices/{id} or download it in the dashboard. The KSeF number is the key you use to retrieve the document from KSeF later.
The PDF is a convenience, not the invoice
A PDF rendering is useful — for a customer to read, for a quick internal check or for printing — but it is not the legal invoice. Notaly generates the PDF from the FA(3) data and carries the KOD I verification QR, while the XML is the document of record. If a PDF and the XML ever disagree, the XML wins.
Disclaimer
Notaly is not a tax, accounting or legal advisor. This article is general information, not tax advice, and may be outdated. You are responsible for your own VAT compliance; confirm with a qualified accountant where required.
Sources
Source: www.podatki.gov.pl