KSeF number: example, structure and where to find it
In short: the KSeF number (numer KSeF) is a unique 35-character identifier that the Ministry of Finance (MF) system gives an invoice after accepting it. You do not assign it yourself and it is not in the invoice file: you see it in your software, in Aplikacja Podatnika KSeF (the free MF taxpayer app), in the UPO and under the QR code on the printout. It is needed for corrections, in the JPK file and, from 1 January 2027, also in the transfer title for payments between active VAT payers.
KSeF number example
A KSeF number looks like this (example from the MF API documentation, used here for illustration only):
5265877635-20250826-0100001AF629-AF
It always has 35 characters: four parts separated by hyphens.
| Part | Example | Length | What it means |
|---|---|---|---|
| Seller's NIP | 5265877635 |
10 digits | Polish tax number of the seller who issued the invoice |
| Date | 20250826 |
8 digits | date the invoice was accepted by KSeF for processing (YYYYMMDD), here 26 August 2025 |
| Technical part | 0100001AF629 |
12 characters | generated by the system, hexadecimal: digits 0-9 and capital letters A-F |
| Checksum | AF |
2 characters | CRC-8, hexadecimal, capital letters |
| Hyphens | - |
3 characters | separators between the parts |
Sources: the MF graphic "Z czego składa się numer KSeF?" (What is the KSeF number made of?) and the KSeF 2.0 API documentation (chapter "Numer KSeF - struktura i walidacja").
The date in the number is the day the invoice was accepted for processing, not the date of sale and not always the date of issue on the invoice. For an offline24 invoice sent a day later, the date in the number will be later than the date in field P_1.
How to check that a KSeF number is valid
The checksum lets software catch a typo before the number is used, for example in a transfer title. According to the API documentation, validation works like this:
- The number has exactly 35 characters.
- Take the first 32 characters (everything before the last hyphen) and compute a CRC-8 with polynomial
0x07and initial value0x00. - Write the result as two capital hexadecimal characters and compare it with the last two characters of the number.
For the example above, the CRC-8 of 5265877635-20250826-0100001AF629 gives AF, which matches. A valid checksum only proves that the number is well formed. Whether such an invoice really exists in KSeF, you check in the system: see "Where to find the KSeF number" below and the FAQ on finding an invoice by its KSeF number.
KSeF number and invoice number: two different numbers
Every invoice in KSeF has two numbers:
- the invoice number you assign, e.g. FV/2026/11/15, the next one in your series (art. 106e ust. 1 pkt 2 of the Polish VAT Act, ustawa o VAT; "art." is article, "ust." paragraph, "pkt" point); in the FA(3) file this is field
P_2, - the KSeF number assigned automatically by the system after it accepts the file.
The MF stresses that the KSeF number is not part of the invoice: the FA(3) structure has no field for it (Podręcznik KSeF 2.0 (KSeF 2.0 manual), part II, chapter 4.1). So you do not enter it by hand, you read it after sending.
When the KSeF number is created
- The software (or Aplikacja Podatnika) sends the XML file to KSeF. An invoice in online mode is issued on the day it is sent (art. 106na ust. 1 of the VAT Act).
- KSeF checks the file: compliance with the FA(3) schema and the sender's permissions (MF FAQ, category "Wystawianie i otrzymywanie faktur" (Issuing and receiving invoices), q. 15).
- If everything is in order, the invoice gets a KSeF number. This usually takes seconds, but under heavy load it may take longer.
- The day the number is assigned is the day of receipt for a buyer with a NIP (art. 106na ust. 3).
The whole path from file to number is described in how to issue an invoice in KSeF (in Polish). If the file is rejected, there is no number and the invoice is not issued. Then you fix the file and send it again, see KSeF rejected invoice.
An interesting case from the MF FAQ: an invoice was sent on 1 February and the KSeF number was assigned on 2 February. The date of issue is 1 February, because what counts is the day the file was registered at the gateway, not the day the number was assigned (MF FAQ, category "Wystawianie i otrzymywanie faktur", q. 13). The date of receipt by the buyer, however, will be 2 February (Podręcznik KSeF 2.0, part II, example 10).
Where to find the KSeF number
- In your invoicing software or store app. The software that sent the invoice receives the number and saves it on the invoice or order.
- In Aplikacja Podatnika KSeF. In the "Lista faktur" (invoice list) menu, tab "Faktury sprzedażowe" (sales invoices, you as seller) or "Faktury zakupowe" (purchase invoices, you as buyer); column "Nr KSeF". You can also filter by KSeF number (Podręcznik użytkownika Aplikacji Podatnika KSeF 2.0 (user manual), version 2.6, chapter 5.3).
- In the UPO. The official confirmation of receipt (Urzędowe Poświadczenie Odbioru, UPO) contains the KSeF number and the date it was assigned (MF FAQ, category "Wystawianie i otrzymywanie faktur", q. 37).
- On the printout or PDF. An invoice delivered outside KSeF has a QR code with the KSeF number under it (MF FAQ, category "Tryby offline i kody QR" (Offline modes and QR codes), q. 7). The link in the code does not contain the KSeF number itself: it has the form
https://qr.ksef.mf.gov.pl/invoice/{seller NIP}/{issue date DD-MM-YYYY}/{SHA-256 hash of the file}, and the page it opens shows the KSeF number of the invoice (KSeF 2.0 API documentation, chapter "Kody weryfikujące QR"). More in QR code on a KSeF invoice.
You do not have to send the KSeF number to your counterparty, because the invoice appears in KSeF under its NIP by itself (MF FAQ, category "Wystawianie i otrzymywanie faktur", q. 41). In a store it is still worth showing it to business customers with the order, because from 2027 they will need it for the transfer.
What the KSeF number is used for
| Situation | What happens with the KSeF number |
|---|---|
| Correction invoice | you give the KSeF number of the original invoice in the DaneFaKorygowanej section |
| Final invoice after advances | you give the KSeF numbers of the advance invoices |
| JPK_V7 from the February 2026 settlement | KSeF numbers of sales and purchase invoices in the records part |
| Transfer between active VAT payers from 1.01.2027 | KSeF number or a batch identifier in the title (art. 108g) |
| Split payment transfer from 1.01.2027 | KSeF number in the split payment (MPP) message (art. 108a ust. 3 pkt 3) |
| Invoice used outside KSeF (PDF, printout) | number under the QR code |
Source: Podręcznik KSeF 2.0, part II, chapters 4.1.1-4.1.6; MF FAQ, category "Wystawianie i otrzymywanie faktur", q. 43.
Corrections
A correction must give the KSeF number of the invoice it corrects. Exception: an original invoice issued outside KSeF, which has no such number. Invoices from offline24, offline or emergency mode have a KSeF number once sent, and the correction must give it too (Podręcznik KSeF 2.0, part II, chapter 4.1.3). For store returns this means the software must remember the KSeF number for every order. See KSeF correction invoice for returns.
Transfers from 2027
For payments made from 1 January 2027, an active VAT payer who pays another active VAT payer by bank transfer for a structured invoice (faktura ustrukturyzowana) gives the KSeF number or a batch identifier in the transfer title (art. 108g of the VAT Act; MF FAQ, category "Wystawianie i otrzymywanie faktur", q. 43). The duty falls on the payer, but as a seller you make your customers' lives easier by showing the number with the order. Details in KSeF number in a bank transfer (in Polish).
Invoice without a KSeF number
An invoice has no KSeF number when:
- it was lawfully issued outside KSeF, e.g. for a consumer, or until 31 December 2026 within the limit of 10,000 zł gross per month (art. 145m), see KSeF 10k PLN limit,
- it was issued in offline24, offline or emergency mode and has not been sent yet; then the printout carries two QR codes labelled "OFFLINE" and "CERTYFIKAT" instead of a number (MF FAQ, category "Tryby offline i kody QR", q. 6),
- it was rejected by KSeF; then it is not issued at all (MF FAQ, category "Wystawianie i otrzymywanie faktur", q. 20).
In KSeF Faktury for Shopify the KSeF number is saved on the order, and the customer sees it on the PDF with the QR code on their order page. The service itself is in early access: you open an account yourself at app.ksefshop.pl/panel/signup.
FAQ
What does a KSeF number look like?
Like 5265877635-20250826-0100001AF629-AF: the seller's NIP, the date the invoice was accepted by KSeF (YYYYMMDD), a 12-character technical part and a 2-character checksum, separated by hyphens. Only digits and the capital letters A-F appear in it.
How long is a KSeF number?
Always 35 characters, hyphens included: 10 + 8 + 12 + 2 characters of data and 3 hyphens. A number of a different length is not a valid KSeF number (KSeF 2.0 API documentation, chapter "Numer KSeF - struktura i walidacja").
Is the KSeF number the same as the session reference number?
No. The session reference number appears in the UPO and identifies the whole sending batch, while the KSeF number refers to one invoice. The MF explicitly warns not to confuse them (Podręcznik KSeF 2.0, part II, chapter 4.2).
Do I have to keep the UPO as proof of the KSeF number?
No. The rules do not require you to keep the UPO, and assigning a KSeF number means the invoice was processed correctly (MF FAQ, category "KSeF w Jednostkach Samorządu Terytorialnego" (KSeF in local government units), q. 41 and 81). You can download the UPO in Aplikacja Podatnika at any time.
How do I find an invoice by KSeF number without logging in?
Aplikacja Podatnika has "Wyszukaj fakturę" (find invoice): you enter the KSeF number, the invoice number, the buyer's identifier and name and the total amount due, and you can download the invoice as XML or PDF (Podręcznik użytkownika Aplikacji Podatnika KSeF 2.0, chapter 4.2.1).
Can the KSeF number change?
No. An invoice accepted by KSeF cannot be edited or deleted; errors are fixed with a correction, which gets its own KSeF number (MF FAQ, category "Wystawianie i otrzymywanie faktur", q. 18).
This article is general information and not tax advice.
Sources
- Pytania i odpowiedzi KSeF 2.0 (KSeF 2.0 Q&A), Ministry of Finance: category "Wystawianie i otrzymywanie faktur", q. 13, 15, 18, 20, 37, 41, 43; category "Tryby offline i kody QR", q. 6, 7; category "KSeF w Jednostkach Samorządu Terytorialnego", q. 41, 81
- Pliki do pobrania KSeF 2.0 (KSeF 2.0 downloads): Podręcznik KSeF 2.0 part II (06.08.2026), Podręcznik użytkownika Aplikacji Podatnika KSeF 2.0 (version 2.6), graphic "Elementy numeru KSeF"
- KSeF 2.0 API documentation: Numer KSeF - struktura i walidacja (CIRFMF, GitHub), checked 31.10.2026
- KSeF 2.0 API documentation: Kody weryfikujące QR (CIRFMF, GitHub), checked 31.10.2026
- Ustawa o podatku od towarów i usług (VAT Act), consolidated text Dz.U. 2026 poz. 1263: art. 106e ust. 1 pkt 2, art. 106na ust. 1 and 3, art. 108a ust. 3, art. 108g, art. 145m
Legal status as of 31 October 2026.