KSeF Poland: Complete Guide to Poland's National e-Invoicing System
Poland's KSeF (Krajowy System e-Faktur — National e-Invoice System) is one of the most technically demanding e-invoicing mandates in Europe. Unlike Peppol-based systems where you send a structured invoice between two business endpoints, KSeF is a clearance model: every B2B invoice must pass through a government API, receive a unique KSeF number, and only then become a legally valid document. If you are a business with a Polish VAT registration — domestic or foreign — this affects you.
What Is KSeF?
KSeF is Poland's centralised national invoice system, operated by the Polish Ministry of Finance (Ministerstwo Finansów). Under the clearance model, an invoice does not legally exist until KSeF acknowledges it. The flow is:
- Supplier generates an invoice in the FA(3) XML format
- Supplier submits it to the KSeF API
- KSeF validates the structure, checks both parties' NIP (Polish tax identification number), and processes the document
- KSeF returns a unique KSeF number (a string of characters that permanently identifies the invoice in the government system)
- The invoice is now legally valid — the buyer can retrieve it directly from KSeF using their own credentials
There is no traditional "send an invoice by email" flow. The buyer does not receive an email with a PDF attachment. The KSeF system is the delivery mechanism.
Who Must Comply?
KSeF is mandatory for:
- All Polish VAT-registered taxpayers issuing B2B invoices — domestic companies and foreign companies with a Polish VAT number
- Both sides of the transaction: the seller submits, and the buyer retrieves from KSeF
- There is no SME exemption — the mandate applies regardless of company size or revenue
KSeF is not currently required for:
- Invoices issued by foreign businesses that are not VAT-registered in Poland
- B2C invoices (consumer sales)
- Invoices issued under OSS/IOSS schemes
- Certain exempted categories (e.g., invoices for transport tickets, flat-rate farmer invoices)
If your business has a Polish VAT registration — even as a foreign company — KSeF applies to the B2B invoices you issue with that Polish VAT number.
Timeline
| Phase | Date | Who |
|---|---|---|
| Voluntary phase | January 2022 | Any taxpayer could opt in to KSeF voluntarily |
| Mandatory — large taxpayers | February 2024 | Large taxpayers (VAT turnover above threshold) |
| Mandatory — all taxpayers | February 2026 | All VAT-registered Polish taxpayers |
As of February 2026, KSeF is mandatory for all VAT-registered businesses in Poland. There is no further deferral.
How KSeF Works — Technical Detail
Authentication
KSeF uses a session-based authentication model. Before submitting invoices, your system must initiate a KSeF session using either a qualified electronic signature (QES), a trusted profile (Profil Zaufany), or an authorisation token issued by the company's KSeF administrator. Sessions expire and must be renewed. The session token is included in every subsequent API call.
The FA(3) Format
KSeF does not use UBL 2.1 or any Peppol-aligned format. Poland has its own national XML schema called FA (Faktura), currently at version FA(3). Key characteristics:
- Polish-language field names (e.g.,
DaneSprzedawcyfor seller data,DaneNabywcyfor buyer data) - Strict element ordering — the XML parser validates elements in a specific sequence; out-of-order elements cause rejection
- Mandatory P18 tax row — the tax breakdown element is required and must include the correct VAT category codes
- NIP numbers for both parties are mandatory and are validated against the Polish tax authority's database on submission
Submission and Status Polling
KSeF invoice submission is asynchronous:
- Submit the FA(3) XML to the KSeF API — you receive a reference number (referenceNumber)
- Poll the KSeF status endpoint using the referenceNumber
- Once KSeF has processed the invoice, the status changes and you receive the KSeF number
- The KSeF number must be stored and associated with the invoice — it is required for payment matching and VAT return reporting
The asynchronous model means you cannot issue an invoice and immediately hand it to the buyer. There is a processing delay — typically seconds under normal load, but potentially longer during high-traffic periods.
The KSeF Number
The KSeF number is the government-assigned identifier that makes an invoice legally valid. It is a long alphanumeric string (around 36 characters). Its importance:
- An invoice without a KSeF number is not a valid invoice for VAT purposes in Poland
- Buyers reference the KSeF number when matching invoices to payments
- The KSeF number is included in VAT return reporting
- It is the reference for any subsequent corrections (credit notes must reference the original KSeF number)
Your system must persist the KSeF number returned from the API. Losing it means reconstructing it from KSeF's search endpoint — possible but time-consuming.
What Happens for Foreign Suppliers?
If you are a foreign business selling to a Polish company but you are not VAT-registered in Poland:
- You are not required to use KSeF for your invoices
- The Polish buyer typically handles the transaction under reverse charge
- Your invoice does not go through KSeF — but the Polish buyer may need to report the purchase separately in their VAT return
If you are a foreign business that is VAT-registered in Poland (for example, because you hold inventory in a Polish warehouse, or you are providing services under the Polish VAT registration), then KSeF applies to the B2B invoices you issue under that Polish VAT number — you are a Polish taxpayer for those transactions.
Common Mistakes
Wrong element ordering in FA(3) XML. This is the most frequent rejection reason. The FA(3) schema is strict about the sequence of elements within parent elements. An invoice that looks correct visually may fail KSeF validation because two sibling elements appear in the wrong order. The fix is to always generate FA(3) XML from a schema-validated template, not by string concatenation.
Missing or incorrect P18 tax row. The P18 element (tax breakdown by rate) is mandatory and must be present even for zero-rated transactions. Missing it causes rejection. For multiple tax rates on a single invoice, each rate must have its own P18 row.
Not polling for the KSeF number. Some integrations submit the invoice and do not implement the polling step — they assume the submission succeeded. The KSeF number is only available after the processing step completes. Without polling, you have an invoice reference but not a legally valid invoice.
Session expiry not handled. KSeF sessions expire. If your system does not detect session expiry and re-authenticate before retrying, submissions will fail silently until the session is refreshed.
Related Reading
- What Is a Peppol Access Point? — how Peppol-based clearance differs from KSeF's model
- E-invoicing VAT Reconciliation — how KAS cross-references JPK_VAT against KSeF records
- Poland e-invoicing coverage — Clearvo's full KSeF implementation details
Live KSeF integration — KSeF number in every API response
Clearvo's e-invoicing API handles FA(3) generation, KSeF session management, status polling, and returns the KSeF number directly. 25 free invoices per month, no sales call needed.
Get started free →