KSeF
Integrating with the API of the Polish e-invoicing system: invoice data, test environment, outages.
IntegrationsUsing since 2025 · Featured project: The Travelling Cows
- Category
- Integrations
- Using since
- 2025
- Featured project
- The Travelling Cows
In practice
KSeF is the Polish Ministry of Finance's national e-invoicing system, and I build the API integration when your own application creates the invoices. At The Travelling Cows the system issues VAT and B2B invoices and sends them to KSeF automatically, with no retyping.
What is KSeF?
KSeF, short for Krajowy System e-Faktur, is the Polish national platform for issuing, sending, receiving and storing invoices. The Ministry of Finance publishes the portal and the API documentation, and the invoices are structured, electronic documents.
Through the API an application can authenticate, open an interactive or a batch session, then send and download invoices. The API also covers offline modes and QR codes, and a test environment with test data is there for trials.
How I work with KSeF
I start by asking where the invoice data comes from in your system, because the rest depends on its quality. I don't interpret the law: your accountant decides what has to be sent and when.
Scope and test environment
I settle which invoices go to KSeF and who issues them. The first calls run against the test environment with test data, never against production.
An invoice from your own system
At The Travelling Cows the system generates VAT and B2B invoices and sends them to KSeF automatically, so nobody retypes them by hand.
Errors and downtime
I plan for the moment KSeF does not answer or rejects an invoice. KSeF has offline modes and technical corrections, and the portal posts notices about disruptions.
When it fits, and when it doesn't
A custom integration fits where your own application creates the invoices.
A good fit when
- A booking platform or a store that issues invoices from order data, with no second program.
- A system that keeps VAT and B2B invoices in one panel, next to the orders.
- An accounting team that should receive invoices without retyping them.
- A company whose invoicing software has no ready connection to KSeF.
Not a fit when
- A handful of invoices a month that someone issues by hand.
- A company whose invoicing program already talks to KSeF.
- A project with nobody to follow changes in the rules and the API docs.
Instead of a custom integration you can issue invoices in the taxpayer application that the KSeF portal provides, or in software that already supports the system. A panel built on Payload CMS or a store with its own order logic is the case for a direct integration.
Frequently asked questions
Do your invoices come out of your own system and need to reach KSeF?
Tell me where the invoice data comes from and who issues the invoices today. I will say whether ready-made software is enough or an API integration is needed, and what I will ask your accountant.