KSeF in an online store – integration, B2B and B2C invoices, checklist
Most companies in Poland have been issuing invoices in KSeF since 1 April 2026, and on 1 January 2027 the smallest sellers join them. For an online store this is not just a topic for the accountant: the invoice is created the moment an order is placed, so it is the store that has to know who it is invoicing, in what format, and what to do when the system returns an error. That is why KSeF integration is now one of the first questions when choosing a store platform.
In this article we describe how the National e-Invoicing System (Krajowy System e-Faktur) works from an e-commerce point of view: which invoices must go through it and which need not, what the path from order to KSeF number looks like, what the integration options are and what to check before launch. The text reflects the situation on 5 December 2026 and is not tax advice – confirm the details of your case with your accounting office and at ksef.podatki.gov.pl.
What the National e-Invoicing System is
KSeF is a government IT system run by the Polish Ministry of Finance through which businesses issue, receive and store invoices. An invoice is no longer a PDF sent by email but a structured invoice: an XML file in a schema defined by the ministry (currently FA(3)). The seller sends the file to the system, the system validates it, assigns the invoice a KSeF number and makes it available to the buyer. The date the invoice is sent to the system counts as its issue date.
In practice this means three changes. You no longer deliver an invoice to a business customer yourself, because they download it from KSeF. The system will not accept a document with a formal error, such as an invalid tax ID (NIP). And an accepted invoice cannot be deleted or replaced: every mistake is fixed with a corrective invoice.
Who KSeF applies to and from when
The obligation came in stages:
| Date | Who issues invoices in KSeF |
|---|---|
| from 1 February 2026 | the largest taxpayers (sales above PLN 200 million in 2024); from that day all businesses receive purchase invoices in KSeF |
| from 1 April 2026 | other businesses, including most online stores |
| from 1 January 2027 | the smallest sellers, i.e. those whose invoiced sales did not exceed PLN 10,000 gross per month |
According to a Ministry of Finance announcement from November 2026, the PLN 10,000 limit ends on 1 January 2027, and KSeF is also to cover invoices previously issued from cash registers and receipts with the buyer's NIP up to PLN 450, which were treated as simplified invoices until the end of 2026. From the same date, bank transfers between active VAT payers must include the invoice's KSeF number or a collective identifier.
Penalties. At the time of publication, the Polish parliament is working on a bill that extends the deferral of financial penalties for errors in using KSeF until the end of 2027. The ministry stresses that this does not change the date of the obligation itself. Check the current legal status before making any assumptions.
Important for small stores: a VAT exemption does not exempt you from KSeF. If you issue invoices to other businesses, the obligation applies to you too.
KSeF and an online store: B2B and B2C invoices
The key question in e-commerce is who is buying. The answer decides whether the invoice has to go through KSeF.
| Buyer | Is KSeF mandatory | How the customer gets the invoice |
|---|---|---|
| Polish company (NIP provided) | yes | downloads it from KSeF; the store can also email a preview |
| Consumer (private person) | no, issuing consumer invoices in KSeF is voluntary | PDF by email or in the customer account, as before; for an invoice issued in KSeF – a visualisation with a QR code |
| Foreign company | the invoice is issued in KSeF, but the buyer has no access to it | in an agreed way, e.g. a PDF with a QR code |
This table leads to the most important requirement for the store: the checkout must distinguish a business purchase from a private one. The simplest way is a "Buying as a company" option with a NIP field and invoice details. If the customer gives the NIP after the purchase, or not at all, documenting the sale correctly becomes a problem, so it is worth asking before payment and validating the number right in the form.
A store selling only to consumers can keep its existing PDF invoices. In practice, though, almost every store has at least a few business customers, and it receives invoices from suppliers, couriers and its payment provider in KSeF anyway. A consumer still gets an invoice on request, as before.
The QR code on an invoice
If an invoice issued in KSeF goes to someone who does not use the system (a consumer, a foreign contractor), you hand over its visualisation marked with a QR code. The code lets the recipient check that the document really is in KSeF and that its data match. Generating this visualisation should be part of the integration, not manual work in a graphics program.
How a store integrates with KSeF, step by step
A well-built integration runs without human involvement. An example order path:
- At checkout the customer marks the purchase as a company purchase and enters a NIP; the store validates it.
- Once the order is paid (or shipped, depending on settings), the store creates a structured invoice in XML.
- The file goes to KSeF through the API. The system validates it and either accepts it or rejects it with an error description.
- The store saves the KSeF number and the official confirmation of receipt (UPO) with the order.
- The customer gets an email about the invoice with a preview; a consumer gets the visualisation with a QR code.
- Invoice data go to accounting, and the KSeF number is visible in the admin panel next to the order and payment.
This is a typical example of the kind of process we describe in what is a workflow: a fixed sequence of steps where a person is needed only for exceptions.
Three ways to integrate a store with KSeF
| Approach | How it works | Who it suits |
|---|---|---|
| Invoicing software as an intermediary | the store passes the order to an invoicing program, which issues the invoice and sends it to KSeF | stores that already work with such a program and have a ready plug-in for it |
| KSeF built into the store platform | invoices are created in the store's admin panel and go to KSeF on their own, with no extra tool | small and medium-sized stores that want orders and invoices in one place |
| Custom integration with the KSeF API | a dedicated module connects the store, warehouse system or ERP directly to KSeF | companies with non-standard processes: several legal entities, wholesale, their own ERP |
Whichever option you choose, you need authentication in KSeF and assigned permissions: the business owner (or a person they appoint) decides who can do what in the system and gives the integration access limited to issuing invoices. The accounting office usually gets separate permissions to view documents.
Corrections, returns and outages – the harder cases
In an online store an invoice is rarely the end of the story. Customers return goods and change their details, and systems have downtime. Before launch, agree on what the integration does in these situations:
- Return or complaint – an invoice in KSeF is corrected with a corrective invoice, also in KSeF. Ideally it is created automatically once the return is approved in the admin panel.
- Error in buyer data – correction notes are no longer used, and an invoice accepted by KSeF cannot be cancelled. A corrective invoice is the only way, which is why validating the NIP at checkout saves a lot of work.
- Advance and final invoices – for prepayments and made-to-order products the store must be able to issue both documents and link them.
- No connection – the rules allow issuing an invoice in offline mode and sending it to KSeF by the next working day at the latest. The integration should queue such invoices and retry, not lose documents.
- Rejection by KSeF – the error must be visible in the admin panel together with the reason, and the responsible person should be notified.
- Sales on Allegro and other marketplaces – you are still the one issuing the invoice to a business buyer, so marketplace orders should follow the same path as orders from the store.
- Cross-border sales – shipping to consumers in the EU and the OSS procedure have their own documentation rules. Settle this area with your accountant before you start configuring the store.
Checklist: a store ready for KSeF
- the checkout distinguishes business and private purchases, and the NIP is validated before payment,
- it is clear who in the company has permissions in KSeF and what access the integration has been given,
- invoices for businesses are sent to KSeF automatically and the KSeF number is saved with the order,
- a consumer receives the invoice in a readable form: a PDF or a visualisation with a QR code,
- a return in the admin panel creates a corrective invoice,
- offline mode is handled and sending is retried after an outage,
- rejected invoices are visible in the panel and someone is responsible for them,
- accounting gets data in an agreed format and has access to purchase invoices,
- transfers to suppliers include the invoice's KSeF number (from 1 January 2027),
- everything was tried out in the KSeF test environment before going to production.
How much KSeF integration costs
KSeF itself is a government system and does not charge for issuing invoices. The cost is in the tools: an invoicing software subscription, a plug-in for the store platform, or a developer's work on a custom integration. So when choosing a platform, check whether KSeF is included in the price or comes as a separate paid item. We describe how to count such fixed costs in our comparison subscription store or your own.
How we help
In the stores we build at Axisway, invoices are issued automatically and, if you want, go to KSeF on their own; the admin panel also includes accounting with data export for your accounting office. A subscription store costs from PLN 200 to 600 net per month, and a store on its own code with AI costs PLN 6,000 net. You will find the details on the online store development page, and the full list of integrations (KSeF, payments, couriers, Allegro, Ceneo) on the AI online store page.
If your invoices are created outside the store, for example from decisions made by email or from data across several companies, we also build custom integrations. One example is the case study invoicing and settlement automation. Only planning to sell online? Start with our guide on how to start an online store.
Summary
KSeF in an online store comes down to a few decisions: how you recognise a business customer, which route the invoice takes to the system, how the customer receives the document and what happens on a return or an outage. Invoices for businesses must go through the National e-Invoicing System, invoices for consumers need not, and from 1 January 2027 the obligation also covers the smallest sellers. The more of this path happens automatically, the less time and fewer mistakes each sale costs.
Questions about KSeF in an online store
Can't find your question? Write to us – we reply within one business day.
Does an online store have to issue invoices in KSeF?
Yes, if it issues invoices to other businesses. Most stores have had this obligation since 1 April 2026, and the smallest sellers from 1 January 2027. Invoices for consumers can still be issued outside KSeF.
Does an invoice for a private person have to go to KSeF?
No. Issuing consumer invoices in KSeF is voluntary. A consumer has no access to the system, so they receive the document in a readable form: as a PDF, or as a visualisation with a QR code if the invoice was issued in KSeF.
Does a VAT-exempt store also have to use KSeF?
Yes. A VAT exemption does not exempt you from KSeF. If you issue invoices to other businesses, the obligation applies to you too, from 1 January 2027 at the latest.
How do I fix an error on an invoice sent to KSeF?
An invoice accepted by KSeF cannot be deleted or changed. An error is fixed with a corrective invoice, also issued in KSeF. That is why it pays to validate the NIP and company details at checkout, before payment.
What if KSeF or the internet is down?
The rules provide for an offline mode: the invoice is issued outside the system and sent to KSeF by the next working day at the latest. A good integration queues such invoices and retries sending on its own.
How long does it take to integrate a store with KSeF?
It depends on the approach. If the store platform has KSeF built in, you only need to assign permissions and run tests. A custom integration with an ERP or several companies requires process analysis, so we set the timeline after talking through how your invoices are created.
Let's see how to connect your store to KSeF
In a consultation we'll walk through the invoice path in your store – from checkout, through KSeF, to accounting – and point out what is worth automating.