KSeF QR Codes — KOD I, KOD II and Offline Mode
An online invoice has one QR code — KOD I, with the KSeF number. An offline or offline24 invoice has two: KOD I "OFFLINE" and KOD II "CERTIFICATE", which confirms the issuer's identity and requires a type 2 KSeF certificate. Your issuing tool computes the codes locally to the ISO/IEC 18004:2024 standard — the KSeF API does not return them.
Online invoice: one code (KOD I)
When you issue an invoice directly in KSeF (online mode), the visualisation (the PDF you hand to the buyer) carries one QR code — KOD I, with the KSeF number underneath. Scan KOD I and it points back to the invoice in the system, letting anyone verify its authenticity and the document's data.
How does online mode differ from offline mode?
In online mode the invoice gets its KSeF number immediately and carries one code — KOD I. In offline mode (and offline24) the document reaches the buyer before the number is assigned, so the visualisation carries two QR codes:
- KOD I labelled "OFFLINE" — used to verify access and the invoice data.
- KOD II labelled "CERTIFICATE" — confirms the issuer's identity. Generating it requires a type 2 KSeF certificate.
Offline24 mode
Offline24 mode comes from art. 106nda of the VAT Act and applies from 1 February 2026. It lets you issue an invoice outside KSeF and send it to the system by the next business day at the latest, so the invoice receives a KSeF number. Until it's sent, the document circulates with two QR codes (KOD I "OFFLINE" + KOD II "CERTIFICATE"), which let the buyer verify it even before the number is assigned.
Where the codes come from — you compute them yourself
That means:
- Your tool has to be able to compute the QR code (and KOD II in offline mode), not just fetch it from the API.
- The code is tied to a specific document — you can't "borrow" one from another invoice.
When QR codes matter most
QR codes matter most for invoices handed off outside the system, where the recipient has no access to KSeF:
- Foreign buyers — the QR code is their way to verify it. See the export invoice guide.
- Consumers and buyers with no NIP — they get a PDF, not a view into the system.
Common misconceptions
- "The QR code comes from the KSeF API" — no; you compute it locally.
- "An invoice always has one code" — no; offline and offline24 have two (KOD I + KOD II).
- "The QR code replaces the KSeF number" — no; it complements it, as a way to verify.
Don't compute the codes by hand
KSeF Kit computes KOD I for you and keeps the verification link on the filed export invoice, so you never work out the formula by hand. We do not produce the visualisation itself: you place the code image on your own printout. See what the UPO is and how to issue a structured invoice.