Skip to content
KSeF Kit

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:

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:

When QR codes matter most

QR codes matter most for invoices handed off outside the system, where the recipient has no access to KSeF:

Common misconceptions

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.

Frequently asked questions

Does KSeF return a ready-made QR code?

No. KSeF assigns the number and the UPO, but you generate the QR code (KOD I, plus KOD II in offline mode) locally — your issuing tool computes it to the ISO/IEC 18004:2024 standard from the seller NIP, the issue date and the SHA-256 hash of the invoice XML.

How many QR codes does an invoice have?

An online invoice has one code — KOD I, with the KSeF number underneath. An invoice issued offline or in offline24 mode has two: KOD I labelled OFFLINE, and KOD II labelled CERTIFICATE, which confirms the issuer's identity and requires a type 2 KSeF certificate.

Who needs the QR codes most?

Buyers who receive invoices outside KSeF: foreign buyers, consumers, and recipients with no NIP. For them, the QR code is the way to verify the document.

How does online mode differ from offline mode?

In online mode the invoice gets its KSeF number immediately and carries one QR code, KOD I. In offline and offline24 mode the document reaches the buyer before the number is assigned, so it carries two codes: KOD I labelled OFFLINE and KOD II labelled CERTIFICATE. Offline24 comes from art. 106nda of the VAT Act and lets you send the invoice to KSeF by the next business day at the latest.