What the KSeF number is (and what it isn't)
The KSeF number is a unique identifier that the national e-invoicing system assigns automatically to every structured invoice the moment it's accepted (Article 2(32a) of the Polish VAT Act). You don't type it in — the system generates it and returns it in the UPO (Urzędowe Poświadczenie Odbioru, the official confirmation of receipt).
Crucially, the KSeF number is not part of the invoice XML. Your invoice leaves your software without it; the number is attached on the KSeF side after the file is processed.
The timing carries legal weight. Under Article 106na of the VAT Act, an invoice is considered issued on the day it's sent to KSeF, and received by a buyer holding a NIP (Polish tax ID) on the day the identification number is assigned.
The biggest misconception: the KSeF number does not replace your invoice number. They're two separate numbers that run in parallel.
Number What it is Where it appears Invoice number (field P_2) Your sequential number, e.g. FV/2026/001 (Art. 106e(1)(2)) On the invoice, in the XML, on the visualization KSeF number Identifier assigned by the system In the UPO, inside KSeF Accounting number Internal reference for your books Only in your own ledgers
One more trap: don't confuse the KSeF number with the reference number, which also appears on the UPO. The reference number identifies the submission session, not the invoice itself — the Ministry of Finance warns about exactly this.
How the KSeF number is built
The KSeF number has a fixed structure defined by the Ministry of Finance, split into four parts:
10 characters — the seller's NIP
8 characters — the date the invoice was sent to KSeF, in YYYYMMDD format
12 characters — a technical part generated automatically
2 characters — a checksum
That makes 32 characters of actual value. In practice it's written with hyphens between the parts, e.g.:
9999999999-20251017-A5FB8G7FG489-8B
(an illustrative, fictional number)
That's why you'll see it described both as "32 characters" (the value itself, which is what goes into JPK_V7) and "35 characters" (when the separators are counted).
Two things to watch:
The NIP in the number isn't always the seller's. With self-invoicing, a VAT RR invoice, or an invoice issued by an enforcement authority, it will be another entity's NIP.
The date in the number is the date of transmission to KSeF, not necessarily the issue date. In offline mode the two can differ, so don't read the date segment as the sale date.
Don't confuse the KSeF number with the collective identifier either — that's a separate 35-character code (e.g. 9999999999-IZ202602-FFFFFFFFFFFF-FF) that aggregates at least two invoices from one seller, used for batch payments.
Where to find the KSeF number
If it isn't on the invoice, where do you look? Four places:
In the UPO — the primary source. Once KSeF accepts the invoice, it returns a UPO containing the number along with the date and time it was assigned.
After logging in to KSeF — every invoice in the Ministry's system is identified by its KSeF number.
In invoicing software integrated with the KSeF API — a good system pulls the number from the UPO and stores it on the invoice automatically, so you never retype it.
On the PDF visualization — optionally. The number isn't there by default, but many tools add a "KSeF data" block in the footer.
Two practical cases:
offline24 mode: the invoice only receives a KSeF number once it reaches the system — i.e. with a delay. Until then you mark it OFF in JPK_V7 and fill in the number once you have it.
Foreign buyer: if the buyer has no access to KSeF, they receive the invoice by an agreed channel (PDF, email). You can then add the KSeF number to the visualization voluntarily.
In Biurko the KSeF number is pulled from the UPO and saved on the invoice automatically — including for offline24 documents, which we track until the number is assigned.
Who needs the KSeF number, and when
This is the heart of the matter. The KSeF number isn't just "for reference" — in several situations you're required to provide it.
1. On a correction invoice. If you correct a structured invoice, the correction must carry the KSeF number of the original invoice (Article 106j(2) of the VAT Act). That's exactly why a seller is required to store the KSeF numbers of their invoices — without them, you can't issue a valid correction.
2. On a settlement or advance invoice. On a settlement invoice (or the final advance invoice completing 100% of the amount) you quote the KSeF number of the advance invoice.
3. In the JPK_V7 file — from 1 February 2026. In the new JPK_V7M(3)/JPK_V7K(3) structure, the KSeF number is reported in the ledger part — for both sales and purchase invoices.
4. In the transfer title — from 1 January 2027. This is the big one. An active VAT payer paying another active VAT payer for a structured invoice (or an offline/offline24 invoice that reached KSeF) will have to put that invoice's KSeF number in the transfer title, and the collective identifier when paying for several invoices at once (Article 108g of the VAT Act). The rule also covers the split-payment mechanism (MPP), where the KSeF number goes in the transfer message, as well as payments made by third parties and factoring companies. Active-VAT-payer status is checked as at the payment date.
Exception: invoices issued offline during an announced outage that were never entered into KSeF don't require a number in the transfer.
5. To your contractor — on request. A buyer with a NIP can access the invoice inside KSeF, so you usually don't need to send them the number. But when they need it (to reconcile a payment or for their own records), it's worth sharing — for example on the visualization.
Note the date: 1 January 2027 is the same date the transitional period ends and penalties for invoicing outside KSeF begin. The transfer-title obligation and the sanctions arrive as one package.
KSeF number — quick checklist
Remember the KSeF number and your invoice number (P_2) are two different numbers — both stay.
Look for the KSeF number in the UPO, not on the visualization.
Don't confuse it with the reference number (submission session) or the collective identifier (batch payments).
Store the KSeF numbers of your invoices — you can't issue a correction without them.
From 1 February 2026, report the KSeF number in JPK_V7 (sales and purchases).
Get ready for 1 January 2027 — the KSeF number in the transfer title becomes mandatory.
Use software that pulls the number from the UPO automatically — retyping 32 characters by hand is an easy way to make a mistake.
Summary
The KSeF number is your invoice's "ID number" in the system — it doesn't replace the invoice number, but from corrections through JPK_V7 to payments in 2027, you increasingly need it on hand. The simplest setup is one where your software does it for you: Biurko pulls the KSeF number from the UPO, fills it into corrections automatically, and exports JPK_V7 with the KSeF numbers attached — no retyping. Try it on your own invoices: start a 14-day free trial at biurko.io.
FAQ
Is the KSeF number the same as the invoice number? No. The invoice number (field P_2) is one you assign yourself, e.g. FV/2026/001, and it's visible on the invoice. The KSeF number is assigned automatically by the system once the invoice is accepted, and you find it in the UPO. Both numbers run in parallel and neither replaces the other.
How many characters does a KSeF number have? The value itself is 32 characters: a 10-character seller NIP, an 8-character date (YYYYMMDD), 12 technical characters, and a 2-character checksum. It's written with hyphens between the parts, which is why it's sometimes quoted as "35 characters" — with the separators counted.
Where do I find the KSeF number of my invoice? Primarily in the UPO that KSeF returns after accepting the invoice. You'll also see it after logging in to KSeF and in API-integrated invoicing software, which pulls it from the UPO and stores it on the invoice automatically.
Do I have to put the KSeF number in a bank transfer? From 1 January 2027, yes — an active VAT payer paying for an e-invoice puts the KSeF number (or the collective identifier for several invoices) in the transfer title. The obligation also covers the split-payment mechanism. Active-payer status is checked as at the payment date (Article 108g of the VAT Act).
Is the KSeF number visible on the invoice the customer receives? Not by default — the KSeF number isn't part of the XML or the standard visualization. A buyer with a NIP sees it inside KSeF or in their accounting software. You can additionally place it on the PDF visualization, especially for a foreign contractor with no KSeF access.
