KSeF API Integration Guide: Poland E-Invoicing Compliance 2026

KSeF API integration for Poland e-invoicing 2026 with FA(3) setup, ERP implementation steps, and compliance requirements.

KSeF API integration process by DDD Invoices, covering ERP registration, secure authentication, invoice submission, and response handling.
Reading time 6 min
Last modified on:
2026-05-27 in General

Poland is introducing mandatory e-invoicing through the KSeF system in stages. From February 2026, it will first apply to large businesses, and from April 2026, most other VAT-registered businesses will also need to follow it. This means invoices will be handled through a central government platform instead of being sent the traditional way.

Companies must follow the FA(3) XML format and ensure their systems are ready for secure digital processing. Integration also requires proper authentication, digital signatures, and testing in the sandbox environment.

 

What is KSeF and Why It Matters for Businesses in Poland 

KSeF (Krajowy System e-Faktur) is Poland’s national e-invoicing platform introduced by the Ministry of Finance. It allows businesses to issue and receive structured invoices through one central government system instead of using PDFs or email invoices.

As part of Poland e-invoicing 2026, the system will become mandatory in phases for businesses operating in Poland that issue structured invoices, especially VAT-registered companies. This means organizations must prepare their ERP systems to meet KSeF API integration requirements, including secure authentication, digital signatures, and compliance with the FA(3) XML format. 

 

Technical requirements for KSeF API

The KSeF API, defined by the Polish Ministry of Finance, follows strict technical standards to make sure every invoice is secure, structured, and compliant. Below are the key requirements explained in a simple way:

  • FA(3) XML Schema Compliance

ERP systems must support the FA(3) XML format. This is a fixed government-defined structure, and every invoice must match it exactly or it will be rejected.

  • REST API (OpenAPI 3.0.4)

The system works through REST APIs based on OpenAPI standards. This allows ERP systems to send invoices and receive real-time responses like confirmations or error messages.

  • Secure Authentication (JWT)

ERP systems must support secure authentication using JWT tokens. This ensures only verified systems can access KSeF and submit invoices safely.

  • Electronic Signatures (XAdES)

All invoices must be electronically signed using XAdES standards. This verifies the sender’s identity and ensures the invoice data has not been altered.

  • Encryption (AES Security)

Invoice data must be encrypted using AES during transmission. This keeps financial information secure while it is being sent to the KSeF system.

Tired of scrolling through information about e-invoicing?

Start fast & easy by:

  1. Register on the platform as a software vendor or a end-client
  2. Start and complete the integration
  3. Send your first invoice into the test environment
  4. Switch to production!
Start free integration

How to prepare ERP for KSeF API integration 

Before starting KSeF API integration, the first step is to register your system in the official KSeF developer portal. This gives you access to the required tools, documentation, and sandbox environment needed for testing. Once registered, you can obtain sandbox credentials to safely test invoice submissions without affecting real data.

After that, you need to download the FA(3) schema, which defines the exact structure of every invoice. At the same time, set up authentication methods and digital certificates so your system can securely connect with KSeF. Finally, map your ERP invoice fields to the FA(3) format, ensuring every data point in your system matches the required government structure.

 

KSeF API integration testing and validation

Before going with KSeF API integration, proper testing is very important to make sure invoices are not rejected and the system works smoothly. According to guidance from the Polish Ministry of Finance, all integrations should be verified in a controlled test environment before production use.

  • Use a sandbox environment before production
    Always test your full invoicing flow in the official KSeF sandbox. This allows you to send sample invoices safely without affecting real business data.
  • Validate FA(3) using XSD
    Every invoice must be checked against the FA(3) XML schema using XSD validation. This ensures the structure is correct before sending it to KSeF, reducing rejection errors.
  • Test edge cases (credit notes, zero VAT, batch invoices)
    Real business scenarios like corrections, zero-tax invoices, and bulk invoice uploads should be tested properly to ensure the system handles all cases correctly.
  • Automate CI/CD compliance checks
    Integration should include automated validation in deployment pipelines so every update is checked against FA(3) rules before it goes live.

 

Step-by-step KSeF API integration process

Integrating with the KSeF API follows a clear flow that connects your ERP system with Poland’s national e-invoicing platform.

1. Register the ERP system in KSeF

Start by registering your ERP or invoicing system in the official KSeF platform so it can be recognized by the system.

2. Authenticate using JWT + signed XML

Access is granted through secure JWT authentication combined with a digitally signed XML request to confirm system identity.

3. Open secure session

Once authenticated, a session is created to allow safe and continuous communication with the KSeF API.

4. Convert invoices into FA(3) format

Your ERP invoice data must be transformed into the FA(3) XML structure required by the Polish government.

5. Send invoices via API

Submit the formatted invoices through the KSeF API endpoints for validation and processing.

6. Store KSeF invoice ID

After successful submission, KSeF returns a unique invoice ID that must be saved in your ERP system as proof of acceptance.

7. Handle responses and errors

Manage API responses properly, including success confirmations, rejections, and error messages, to ensure a smooth invoicing flow.

KSeF API integration process by DDD Invoices, covering ERP registration, secure authentication, invoice submission, and response handling.

 

Common KSeF API integration issues 

When integrating with the KSeF API issues come from small setup or formatting mistakes. One of the most common problems is an invalid XML structure, where the invoice does not fully match the FA(3) format required by the Polish system. Duplicate invoice rejections also happen when the same invoice is sent more than once without proper handling.

Another common issue is expired sessions, since KSeF sessions have a time limit and must be refreshed regularly. Encryption errors can also block submissions if digital signatures or AES setup is incorrect. On top of that, API rate limits may slow down or temporarily stop requests if too many invoices are sent at once.

 

Why middleware is important for KSeF API integration 

Middleware is important in KSeF API integration because it acts as a bridge between the ERP system and the KSeF platform. Instead of connecting everything directly, it handles all communication in one central layer, which keeps the ERP system simpler and easier to manage.

It also makes updates and scaling much easier. When there are changes in the KSeF API or FA(3) schema, only the middleware needs to be updated, which helps avoid system-wide issues and keeps invoicing stable. It can also support multiple ERP systems or clients through one integration layer without adding extra complexity.

 

How DDD Invoices can help with KSeF integration 

DDD Invoices helps simplify KSeF API integration by handling the complex technical and compliance requirements. Instead of building everything from scratch, businesses can connect their ERP systems through a single API integration point.

By using DDD Invoices, companies can focus more on their core operations while staying fully aligned with Poland’s 2026 e-invoicing requirements, ensuring smoother compliance and fewer disruptions in invoicing workflows. It also supports scalability and borderless growth, making it easier for businesses to expand into new markets without worrying about rebuilding or adjusting their invoicing infrastructure. 

Still have questions?

Talk to us!

In the 30min free call we will discuss:

  • your requirements in invoicing
  • how integration works
  • demo of the product
  • next steps
Book a free 30min call

FAQs

Is KSeF API integration mandatory for businesses in Poland?

Yes, KSeF API integration becomes mandatory from February 2026 for several sectors in businesses issuing structured invoices in Poland. Every invoice must go through the KSeF system using the FA(3) format, otherwise it will not be legally valid.

What is needed to connect with the KSeF API?

To connect with the KSeF API, businesses need proper authentication using JWT tokens, digital certificates, and support for FA(3) XML format. ERP systems must also be configured to handle secure API communication and follow government-defined technical standards.

What are the common issues during KSeF integration?

The most common issues include incorrect XML structure, expired sessions, duplicate invoice rejections, and encryption errors. These usually happen due to missing validation or incorrect setup, which is why proper testing and sandbox usage is very important.

Can KSeF integration be tested before going live?

Yes, businesses can fully test their integration using the official KSeF sandbox environment. This allows teams to safely send sample invoices, check FA(3) validation, and fix errors before moving to the live production system.

Written by the Compliance & Growth Team
Reviewed by Denis V. P.

Table of contents
  • What is KSeF and Why It Matters for Businesses in Poland
  • Technical requirements for KSeF API
  • How to prepare ERP for KSeF API integration
  • KSeF API integration testing and validation
  • Step-by-step KSeF API integration process
  • Common KSeF API integration issues
  • Why middleware is important for KSeF API integration
  • How DDD Invoices can help with KSeF integration
  • FAQs