ENATIV Logo
ENATIV
Back
© 2026 ENATIV
ProjectsServicesKnowledge hubContact
contact@enativ.pl
  1. Knowledge hub
  2. ›
  3. Integrations
  4. ›
  5. KSeF

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.

  1. 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.

  2. 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.

  3. 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

No. You can also issue invoices in the taxpayer application that the KSeF portal provides. A custom API integration pays off when invoices come out of your own system, for example from bookings or orders, and you do not want to key them in a second time.
I give no dates or thresholds here, because they depend on your tax situation. Check the current rules on the Ministry of Finance KSeF portal, which keeps a rollout calendar, or ask your accountant. I handle the technical side, not the interpretation of the law.
For that case there are offline modes and technical corrections, and the portal announces disruptions. So I usually plan retries for sending and do not block a sale while the system is briefly silent. The details we settle with your accountant, who knows your obligations.
Where the invoice data comes from. If your system already holds correct seller and buyer details and the invoice lines, the integration is mostly authentication and sending, then error handling. If the data is scattered, I tidy it first, and that usually takes longer than the API itself.

On this page

  • In practice
  • What is KSeF?
  • How I work with KSeF
  • When it fits, and when it doesn't
  • Frequently asked questions

Related topics

  • KSeF
  • InPost
  • Shopify
  • Payload CMS
  • Next.js

Related services

  • E-CommerceHeadless Shopify, Medusa.js, and custom storefronts with Stripe.

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.

Describe your projectSee The Travelling Cows