KSeF

KSeF archiving and retention: what to keep for 10 years

What KSeF stores for you, what to archive locally (the FA(3) XML, UPO and KSeF number) and why the PDF is a convenience, not the legal record.

Published 3 min readBy Tomek

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 number and the KSeF number together. Treat the PDF as a readable copy for people, not as the document of record.

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 returns the UPO (Urzędowe Poświadczenie Odbioru) — the official proof of receipt — and assigns the invoice a unique KSeF number. 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 number and the KSeF number. In the Notaly API these arrive together with the accepted status on the invoice webhook, and you can also download the exact XML sent to KSeF with GET /invoices/{id}/xml. 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.

FAQ

What is the legal invoice in KSeF? The structured FA(3) XML. The PDF is a human-readable visualisation, not the legal record.

How long does KSeF keep invoices? KSeF stores the structured invoices it holds for 10 years. Confirm the retention period that applies to your own books with your accountant.

What should I store locally? Keep the FA(3) XML, the UPO number and the KSeF number together, so you can prove acceptance and retrieve the document later.

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

Frequently asked questions

What is the legal invoice in KSeF?

The structured FA(3) XML. The PDF is a human-readable visualisation, not the legal record.

How long does KSeF keep invoices?

KSeF stores the structured invoices it holds for 10 years. Confirm the retention period that applies to your own books with your accountant.

What should I store locally?

Keep the FA(3) XML, the UPO number and the KSeF number together, so you can prove acceptance and retrieve the document later.

Issue your first KSeF test invoice today

Create a sandbox account: API key in seconds, 3 free test invoices on KSeF TEST, no credit card.