HAERGI

KSeF collective payments in SAP – integration with SAP and ERP systems

Mass Payments in KSeF – Integration with SAP and ERP Systems

Is your organization ready to process mass payments in KSeF?

Mass payments in KSeF are becoming increasingly important in the context of ERP system integration. As ERP systems adapt to the new landscape of electronic invoicing, one of the main challenges is effective integration with the National e-Invoicing System (KSeF) – especially when it comes to handling mass payments.

For companies using SAP or legacy systems, implementing this functionality requires not only technical knowledge of integration but also an understanding of the new model for processing accounting data.

In this article, we provide a comprehensive overview of handling collective payments within the KSeF framework, with a focus on SAP integration. We explain how the collective identifier works, which interfaces are required, the most common errors, and how to avoid them. We also share our experience in implementing such processes – both within SAP environments and beyond.

What are Mass Payments in KSeF?

Mass payments are a mechanism that allows for making a single transfer to cover multiple invoices. In the KSeF environment, this process requires assigning a unique collective payment identifier (known as the collective identifier), which allows a payment to be clearly linked to specific documents in the e-invoicing system.

How Does It Work?

The process can be broken down into a few steps:

  1. Selecting multiple invoices eligible for a joint payment.
  2. Generating a collective identifier (e.g., in SAP or another ERP system).
  3. Using this identifier in the title of the bank transfer.
  4. The ability to “decode” the collective identifier – i.e., determining which invoices were included in the payment.

KSeF enables linking this identifier to invoices registered in the system. As a result, both accounting systems and audit institutions have easy access to complete payment information.

Integration of Collective Payments with SAP – Challenges and Best Practices

SAP System Structure

As an ERP-class system, SAP offers a variety of integration options – from file-based interfaces and IDocs to modern REST APIs. However, implementing mass payments with KSeF requires specific adjustments:

Technical Interfaces

Depending on the system architecture, different integration scenarios with KSeF are possible:

Adapting to Organizational Needs

From a project perspective, it is crucial to:

Mass Payments in KSeF. Common Mistakes in Implementing Mass Payment Integration with KSeF for SAP

Despite available technologies, many implementations encounter the same issues. Here are the most common:

1. Lack of logical connection between payment and invoices

If the collective identifier is not clearly linked to invoices in the ERP system, automatic bank statement processing becomes problematic.

2. Incorrect data format sent to KSeF

Especially at the start, API compliance is crucial. Many KSeF error messages are not clearly descriptive.

Recommendation: Use the latest documentation from the Ministry of Finance and tools for validating data structure (e.g., XSD + online validators).

3. Inadequate integration testing

Integration with KSeF is not just a technical connection but also requires understanding the business context of invoices.

Recommendation: Test on anonymized production data and create test scenarios using different invoice types.

4. Ignoring KSeF offline compliance (fallback mode)

As of KSeF version 2.0, it is essential to account for fallback scenarios (e.g., “offline24” mode).

Recommendation: Implement buffering and deferred sending mechanisms, including retrieval of collective identifiers.

What About Integration with Legacy Systems and Non-SAP Platforms?

For organizations not using SAP, the challenges are different – but just as important. In practice, we most often encounter needs such as:

In such cases, we offer adapters and converters that enable generating collective identifiers and synchronizing data with KSeF, without requiring a full ERP system overhaul.

Why Are Mass Payments Important?

For many organizations processing a large number of monthly invoices, mass payments in KSeF offer:

In the KSeF context, where each invoice must be recorded and linked to a payment, the collective identifier becomes a key functionality.

Why Implement Mass Payments Support in KSeF?

Implementing mass payments integrated with KSeF is not just a legal requirement, but primarily an opportunity to:

Leverage Haergi Experts’ Knowledge

If your company is facing the challenge of integrating KSeF with SAP or another ERP system – we are here to help. We have experience in implementations in large SAP environments as well as in adapting legacy systems to e-invoicing requirements.

Contact us for a free consultation and a tailored integration architecture proposal for your system.