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.

A common question after the first invoice goes through: "where's the QR code?" The answer surprises people — KSeF does not return a ready-made QR code. Your issuing tool generates it locally, to the ISO/IEC 18004:2024 standard, from the invoice data and the KSeF number. The KSeF API does not return it.

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 it carries two codes — KOD I "OFFLINE" and KOD II "CERTIFICATE", which attests to the issuer's identity and requires a type 2 KSeF certificate.

When an invoice is created outside the system (offline or offline24 mode), the visualisation carries two QR codes:

That's the core difference from an online invoice: offline mode adds a second code, because the document reaches the buyer before the system assigns it a KSeF number, so the issuer's identity has to be attested with a 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

This is the key implementation detail: KSeF assigns the KSeF number and the UPO (the official confirmation that the invoice was received), but you generate the QR codes yourself from the invoice data and the KSeF number. That means:

In KSeF Kit the QR codes are computed automatically and placed on the invoice visualisation — you never need to know the formula or work them out by hand.

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

Generating KOD I and KOD II is a frequent source of implementation bugs. KSeF Kit computes the QR codes for you and places them on the visualisation of every invoice you file. 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 invoice data and the KSeF number. The KSeF API never returns it.

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.