If you operate a Polish entity that issues VAT invoices to other businesses — which is to say, virtually every Sp. z o.o. doing wholesale, B2B services, or marketplace selling — you're already inside the KSeF perimeter.
This primer is for operators, not lawyers. It covers what KSeF is, what it requires of your commerce stack, and the three integration mistakes we see most often.
What KSeF actually is
KSeF (Krajowy System e-Faktur — National e-Invoice System) is Poland's centralized e-invoicing platform run by the Ministry of Finance. Every B2B sales invoice must be issued through it in a structured XML format (FA(3) schema), receive a KSeF reference number, and be deemed delivered at that moment — regardless of whether the buyer has retrieved it.
Three properties matter for commerce:
- It replaces invoice delivery. The KSeF reference number IS the invoice. PDF or paper become redundant.
- It's structured data, not a document. Your buyer's accounting system parses the XML directly.
- It has a hard deadline. Mandatory for active VAT payers (~ €10M+ revenue threshold from Feb 2026; broader from later in 2026).
What needs to wire into your commerce stack
For an e-commerce operation, KSeF integration touches four systems:
1. Order → Invoice generation
When a Polish customer order is paid, your system must:
- Detect whether the buyer is a business (NIP-validated) or consumer.
- For business orders: generate FA(3) XML, sign it, submit to KSeF API, receive reference number.
- For consumer orders: traditional fiscal receipt (or
kasa fiskalnaintegration if you have a physical presence).
2. Authentication
KSeF API requires one of:
- Qualified electronic signature (kwalifikowany podpis elektroniczny) — issued by accredited providers.
- Trusted profile (profil zaufany) — for one-off use.
- API token issued by the entity's tax representative — most practical for automated commerce.
The API token route is what you'll want. Tied to your company's KSeF account, scoped to invoice issuance.
3. Reference number persistence
Every invoice gets a unique KSeF number that must be:
- Stored in your order/invoice records.
- Displayed to the buyer (in confirmation emails, customer portal).
- Used in any future corrections or credit notes (referencing the original).
4. Corrections and refunds
A KSeF invoice can't be edited. Corrections require faktura korygująca — a separate XML referencing the original KSeF number. Your refund flow must issue these, not just modify the original.
The three integration mistakes
We've seen these enough times that they deserve their own list.
Mistake 1: Treating KSeF as a tax accountant problem
If your invoices are issued by an accountant after-the-fact, you've already lost. Buyers expect the invoice at the point of payment, not seven days later. Bake the KSeF flow into the order webhook from day one.
Mistake 2: Generating invoices client-side
Shopify and other platforms have apps that "generate invoices." Most of them generate documents — not KSeF-compliant XML, not signed, not submitted. Verify that your invoicing pipeline actually calls the KSeF API and stores the reference number. PDF in your buyer's email isn't proof of compliance.
Mistake 3: Ignoring the correction flow
It's the refund flow that catches teams off-guard. Customer returns a product → your system issues a refund → but does it issue a faktura korygująca referencing the original KSeF number? If not, your VAT records are out of sync with the central system. This is the most common audit finding.
What we wire when we operate this for clients
For Senavia-run operations, KSeF is a Track 1 deliverable:
- API token provisioned with the Polish tax representative.
- Order webhook → FA(3) XML generation → KSeF submission → reference number stored.
- Customer-facing invoice display includes the KSeF reference.
- Refund webhook →
faktura korygującaautomatically issued and stored. - Monthly reconciliation between Shopify order count, KSeF invoice count, and accounting export.
It's about a week of operational engineering. Not glamorous, but it's the difference between "we comply" and "we have a clean audit."
This primer is informational; it's not legal advice. KSeF rules change. Confirm specifics with a Polish tax advisor for your situation. We're happy to introduce you to ours.