Over 40 invoices per second. How Euvic’s KSeF Connector works

Solution:
KSeF Connector
Industry:
Energy
Country:
Poland
Service:
A service that enables invoices to be submitted to KSeF in online or offline mode.
Highlights_
KSeF Connector is an integration service acting as an intermediary layer between the billing system and the National e-Invoicing System. It handles bidirectional synchronisation of invoices and their statuses, encapsulating the full complexity of KSeF communication ( authentication, data mapping, queuing, and monitoring), so that the client’s domain system remains as isolated from it as possible.
The solution operates in both online and offline modes and was designed with scale in mind: it processes thousands of invoices per day across the production environments of several energy organisations
Our role in the project_
The obligation to integrate with Poland’s National e-Invoicing System (KSeF) applies to every company issuing invoices in the country, regardless of industry, scale of operations, or the billing system in use. For organisations in the energy sector, where invoices are counted in thousands per day, this challenge takes on a particular dimension: what matters is not only regulatory compliance, but also the reliability, speed, and scalability of the entire process.
The obligation to integrate with Poland’s National e-Invoicing System (KSeF) applies to every company issuing invoices in the country, regardless of industry, scale of operations, or the billing system in use.
For organisations in the energy sector, where invoices are counted in thousands per day, this challenge takes on a particular dimension: what matters is not only regulatory compliance, but also the reliability, speed, and scalability of the entire process.
Euvic responded to this need by designing and deploying KSeF Connector, a dedicated integration service that today runs successfully in the production environments of several energy sector organisations.
Key objectives_
The primary business objective behind building KSeF Connector was to provide any organisation with a ready-made, proven tool for integrating with the National e-Invoicing System, one that can be deployed quickly, without overhauling existing billing systems.
Three concrete needs drove that objective:
- ensuring full compliance with the e-invoicing obligation,
- handling high invoice volumes without performance degradation,
- enabling the solution to be redeployed with subsequent clients without rebuilding KSeF logic from the ground up each time.
The result is a connector that not only meets regulatory requirements but systematically shields clients’ domain systems from the full complexity of KSeF communication, allowing them to focus on what they do best.
Challenges_
At first glance, integrating with KSeF sounds like a technical task of limited complexity – issue an invoice in system A and pass it to system B. Reality proved far more demanding.
KSeF is not a passive document recipient: an invoice must be accepted by the system before it reaches the end customer, which means the connector must plug directly into the invoicing and dispatch process and efficiently manage the asynchronous nature of the events involved.
On top of that comes the technical complexity of the format itself.
Mapping data from a legacy system invoice onto the FA(3) structure defined by KSeF requires precision and a deep understanding of both environments, an incorrectly mapped document may pass through
the system, but in the event of an audit by the National Revenue Administration it can become the source of serious consequences.
The reference number assigned by KSeF must be returned to the legacy system as quickly as possible, because only then can the invoice be sent to the recipient. Additional challenges include handling documents issued at the turn of the day, invoices that exceed KSeF limits, and the need to retrieve and store the UPO (Official Receipt Confirmation).
KSeF Connector addresses all of these challenges, taking full responsibility for the integration logic and completely relieving the client’s billing system of that burden.
Workflow_
- Analysis – work on KSeF Connector began with a detailed analysis of functional and non-functional requirements, conducted jointly with the first client, whose open and collaborative approach made it possible to develop a complete, well-documented specification.
- Architecture and tests – on that basis, the solution architecture was designed, after which work on the connector itself and the necessary modifications to the client’s domain system proceeded in parallel. Following a phase of internal testing and UAT, the solution went live and processed its first invoices, closing the full cycle in just one quarter.
- Deployment – the experience gained and the connector built became the foundation for the next deployment, carried out in a fast-track model: reuse of the generalised connector made it possible to skip the build-from-scratch stage and focus solely on configuration for the next organisation’s specific setup.
Strategy adopted_
The starting point for building the solution was a collaborative approach to analysis, developing functional and non-functional requirements thoroughly enough to apply an AI-supported Specification Driven Development methodology.
It was precisely this methodological decision that made it possible to close the full cycle, from analysis to production deployment, in just one quarter. The team worked in a Fixed-Price model, which required precise scope management and transparent communication with the client at every stage. In parallel with work on the connector, the same team introduced modifications to the client’s domain system, ensuring a smooth flow of invoices in both directions, without the need to engage separate resources on either side of the integration.
Delivered solutions_
KSeF Connector is a service running silently in the background of the billing system – quiet, but critical to the entire invoicing process. From the perspective of the client’s domain system, integrating with KSeF comes down to one thing: send a document to the connector and wait for a status update in return.
Everything else the connector handles autonomously:
- certificate-based authentication,
- FA(3) format mapping,
- preliminary validation,
- queuing,
- communication with KSeF in batch sessions,
- dynamic throttling limit management,
- status monitoring,
- returning the KSeF-assigned number back to the domain system.
The solution operates in both online and offline modes, generating QR codes for invoices issued outside a KSeF session. It retrieves and stores the UPO, handles invoices issued across the day boundary, and manages documents that exceed system limits.
It actively notifies the domain system of any status change via a webhook mechanism, meaning the invoice reaches the end customer exactly when KSeF accepts it. The multi-instance architecture supports multiple companies within a single deployment, and the connector is generalised enough that subsequent organisations can deploy it in a fast-track model, without rebuilding KSeF logic from scratch.
Technologies_
- .NET 10.0 REST API
- PostrgeSQL
- Self Hosted Workers
- Github Copilot
- Azure Blob Storage
Key figures_
- 99.66% invoice synchronisation accuracy rate in the production environment
- 40+ invoices/second – throughput delivered by the connector’s asynchronous architecture
- 1 quarter – time from analysis to production deployment for the first client
- 5 companies handled simultaneously in a multi-instance model for one client









