Service · Software development

Build a KSeF integration for your ERP.

KSeF (Krajowy System e-Faktur) is becoming Poland's mandatory e-invoicing system. Do you have a Polish branch, a subsidiary in Warsaw or B2B exports to Poland? Then your outgoing invoices must go through the KSeF platform. We build the technical integration from SAP, Microsoft Dynamics, Exact or AFAS to the KSeF API.

FA(3) XSDIDoc mappingSandbox & productionDigital signature

A KSeF integration is not a plug-in, it is an ERP integration.

KSeF enforces a fixed XML structure (FA(3)), requires qualified digital signatures for authentication, and has strict rules for pre-validation, retries and archiving. An out-of-the-box connector rarely covers the entire flow, especially if your invoice data comes from a SAP IDoc, Dynamics F&O or custom middleware. The Polish tax authority wants to receive the invoice live, validate it against the schema, assign a UUID and only then accept it. Only at that point is the invoice legally considered issued.

We have been building custom integrations for ERP and invoicing systems since 2015. For KSeF, that means schema mapping from your source system to FA(3), token-based authentication against the Ministry of Finance environment, a clean retry and error layer, and archiving that meets the Polish statutory retention requirements. We do not give tax advice; that is for your tax adviser. We do provide the technology that works on the first day KSeF becomes mandatory.

Our role does not end at "the XML gets through". We also consider the consequences for your accounts receivable administration, the timing of credit notes and corrections, and how to ensure rejected submissions do not quietly sit in a queue. Building for KSeF is largely about catching exceptions: a standard invoice is easy, but an exception costs you money if it is not handled correctly.

Three types of KSeF integration.

The right option depends on your invoice volume, your source systems and how many exceptions you have in your outgoing invoice flow. We will advise which variant fits during the first conversation.

Compact project · fixed sprint budget

Direct KSeF integration from a single ERP

One source system (Exact, AFAS or a comparable package), outgoing invoices from one Polish entity. We build a lightweight integration layer that retrieves invoice data, maps it to FA(3) XML, signs it and submits it to KSeF. Includes sandbox testing and go-live support.

FA(3) mappingSignature flowUUID handlingStatus callback
Mid-sized project · fixed sprint budget

SAP IDoc / EDI bridge to KSeF

SAP ECC or S/4HANA as the source, using IDoc INVOIC or an outbound EDI stream. We build a middleware layer (Azure, GCP or on-premises) that consumes IDoc/EDIFACT, transforms it to FA(3), handles the KSeF submission and writes the result back as a confirmation or error. Includes operational monitoring and resubmissions for rejected invoices.

IDoc INVOICEDIFACT mappingMiddlewareRetry flow
Larger project · fixed sprint budget

Multi-entity KSeF platform with Peppol overlap

Multiple Polish branches, multiple ERPs, and Peppol in parallel for the rest of the EU. We build a central e-invoicing platform with routing logic per country and per entity, shared archiving, an audit log, and a dashboard where your finance team can view rejected invoices, open UUIDs and signature status.

Multi-ERPPeppol overlapRouting engineFinance dashboard

What you get at the end.

A production-ready KSeF integration, plus everything you need to manage it yourself and extend it to new entities.

  • The integration layer itselfProduction and sandbox environments, connected to both your ERP and the KSeF API of the Polish Ministry of Finance.
  • FA(3) schema mappingDocumented mapping of your IDoc fields, Exact XML or AFAS Profit fields to the FA(3) XSD schema, including fallback rules for missing data.
  • Signature and token flowImplementation of KSeF authentication via qualified certificate or token, with automatic renewal and key rotation.
  • Archiving & audit logEncrypted long-term storage in line with the Polish statutory retention requirement of ten years, with an audit log for inspection by the tax authority or your accountant.
  • Operations dashboardInsight into submitted, accepted, rejected and pending invoices, with one-click resubmission for rejected submissions.
  • Codebase + runbookFull source code, build instructions and a runbook for incidents, so your IT team can handle escalations themselves.
  • Maintenance contract (optional)Monitoring, security patches, schema updates whenever KSeF releases new FA versions, and ongoing development on a fixed monthly fee.

When a KSeF integration is the right choice.

Four situations in which we guide businesses. If you recognise one of them, we would be happy to discuss the scope with you.

Obligation

Polish entity within your group

You have a subsidiary, sales office or production site in Poland that issues B2B invoices. The Polish tax authority will soon only accept invoices submitted via KSeF, so your own ERP needs to be able to communicate with it.

Export flow

Dutch business with B2B exports to Poland

You invoice Polish B2B customers from the Netherlands. Depending on your VAT position and the status of the customer, this flow may also fall under KSeF. A hybrid setup, using Peppol for other EU countries and KSeF for Poland, is then the most robust route.

SAP landscape

SAP user with IDoc flows

Your outbound invoices run via IDoc INVOIC or an EDI stream. The step from IDoc to FA(3) XML is not trivial. We build the mapping and the middleware in between, so your SAP team does not need to touch the standard setup.

Scale

Multi-entity, multiple ERPs

Your group runs partly on SAP, partly on Microsoft Dynamics or Exact, and you have multiple VAT numbers in Poland. A single central e-invoicing platform with routing per entity prevents you from building the same integration three times.

Risk

Existing connector does not cover it

You already have a KSeF button in your invoicing package, but the vendor provides no support for your own layout, IDoc fields or correction flows. A thin custom layer on top of the connector bridges the gap without replacing your entire invoicing system.

Compliance

Audit trail down to invoice level

Your accountant or the Polish tax authority wants to see, for each invoice, when it was submitted, with which signature, which UUID was returned and who viewed it. A standard ERP log is too coarse for that; we deliver a dedicated audit layer.

How a KSeF project runs.

1

Introduction and scoping

A conversation in which we establish which entities need to invoice via KSeF, which source systems are involved and how many exceptions exist in your invoice flow (credit notes, advance payments, corrections).

2

Schema analysis & data mapping

We place your outbound invoice data alongside the FA(3) XSD schema. Fields that do not map one-to-one receive mapping rules or fallback values. The result is a complete mapping table that you can maintain yourself.

3

Build in sprints, sandbox first

A working build every sprint. We start in the KSeF sandbox, exactly where people searching for "ksef sandbox" end up, test the signature flow and submission, and work through rejected scenarios together before going live.

4

Pre-validation & error handling

Every invoice is pre-validated against the schema, plus the KSeF business rules we are aware of. This prevents rejections from only becoming visible after submission. Rejected submissions receive a clean retry flow with an audit log.

5

Go-live and archiving setup

A phased transition from sandbox to production, archiving set up in line with the Polish retention requirement, and knowledge transfer to your finance and IT teams. Dashboards are ready for inspection or audit.

6

Maintenance & further development

KSeF changes regularly (new FA versions, additional validations). We monitor those changes, adjust the schema as soon as Poland publishes it, and extend the integration when entities or ERPs are added.

Frequently asked questions.

What clients usually want to know before we start.

When does KSeF actually become mandatory, and for whom?
KSeF is announced as the mandatory system for B2B invoices in Poland. The Polish government has moved the exact start date several times; the most recent plan is a phased obligation from 2026 for large taxpayers, followed by the rest of the SME sector. We are monitoring the roadmap and will plan your integration so that it is running in the sandbox well before your deadline. Important to understand: once the mandate takes effect, the tax authority will no longer accept a paper or PDF invoice as a valid tax document. Anything you send outside KSeF formally does not count. Your customer may then be unable to reclaim the VAT, and you would effectively be left without a recognised invoice.
What is FA(3), and why is that schema so strict?
FA(3) is the XML schema that KSeF prescribes for electronic invoices: a detailed XSD with mandatory fields for parties, invoice lines, VAT codes and corrections. It is strict because the Polish tax authority can validate the content directly and only accepts an invoice after schema validation. Beyond pure schema checks, there are also business rules: certain combinations of VAT rates and invoice types are not permitted, NIP numbers must validate against the Polish register, and corrective invoices must reference the original invoice by UUID. We also perform this validation on our side before submission, so that rejections remain rare.
How do you connect SAP IDoc INVOIC to KSeF?
Through a middleware layer between SAP and KSeF. The IDoc is picked up (via RFC, a file port or an EDI broker), transformed into FA(3) XML, signed with the qualified certificate and submitted to KSeF. We write the receipt confirmation or rejection back to SAP, as IDoc status, a custom Z-table or e-mail notification, depending on what your SAP team prefers. We keep your SAP system explicitly clean: no Z-development within SAP and no changes to standard IDoc segments. All KSeF-specific logic sits outside SAP, in a separate service that we manage or that you can run yourselves after handover.
Can we test safely in a sandbox first?
Yes. KSeF has a separate sandbox environment that is identical to production in terms of API and schema. We build against it first, run a full end-to-end test with real invoice data, and only once the signature flow, submission, callback and error paths all work correctly do we switch over to production. The switch itself is a configuration change, not a code change. In the sandbox we also deliberately simulate failure scenarios: an incorrect VAT rate, a missing NIP, a timeout on the KSeF side, a revoked signature. Only once those paths are handled cleanly do we go live.
How do we connect Exact Online or AFAS to KSeF?
For Exact Online we build the integration on the Exact Online API; for AFAS we deliver via Profit connectors or GetConnectors. The integration layer between your accounting package and KSeF sits as a separate service, so an upgrade of Exact or AFAS won't break the KSeF integration. See also our Exact Online integration page for the Exact side. For AFAS we typically use a GetConnector to extract invoice data, an UpdateConnector to write the KSeF status back, and a separate service for the KSeF submission itself. This keeps the AFAS environment within the scope of your AFAS consultant and the KSeF layer within ours.
Does this work alongside Peppol for other EU countries?
Yes. Peppol is emerging as the universal e-invoicing network for the EU, while Poland has its own mandatory system with KSeF. Many multinationals run into that parallel world. We build routing logic that chooses, per recipient country and VAT position, between Peppol, KSeF or another mandate (for example SDI in Italy or FacturaE in Spain). One platform, multiple channels, one shared audit log. That makes management far easier: one integration team, one set of monitoring dashboards, and one place where the finance controller can see rejected invoices.
What about archiving and the retention obligation?
Polish tax law requires invoice data to be archived for many years, usually ten. We set up encrypted storage in your cloud or with us, with write-once logging and an audit trail that shows who viewed or exported which invoice, and when. Access runs through your identity provider (Azure AD, Okta, Google Workspace), so it falls within your existing security policy. Alongside the FA(3) XML, we also keep the corresponding KSeF UUID, the acceptance timestamp and, where relevant, the original source IDoc or API response, so you can present the full trail in an audit.
What if KSeF rejects our invoice? Who corrects what?
Rejections come in various forms: schema errors (a field that doesn't match), business rule errors (an invalid NIP, an incorrect VAT rate), or technical errors on the KSeF side (timeouts, maintenance). We separate these paths in code: schema errors go back to your finance team with a clear explanation, business rule errors trigger a manual review, and technical errors are retried automatically with exponential backoff. Nothing disappears into a log file nobody checks. Everything appears on the operations dashboard with an action button.
What does a KSeF integration cost?
That depends heavily on scope. One ERP and one entity is a short engagement; a multi-entity setup with SAP IDoc flows and Peppol overlap is a larger one. In the first conversation we walk through the scope and then link back a sprint budget. No open-ended hourly billing; fixed budgets per sprint. We also state explicitly which risks fall outside the current scope (for example, new FA versions that Poland only publishes later) and how we handle them in maintenance without the project running on indefinitely.

Talk to us about your KSeF integration.

A half-hour introductory meeting, with no obligation. We listen to your invoice flow, ask questions about your ERP landscape, and give direction on scope, phasing and any overlap with Peppol. If you run on SAP, we also look at how the IDoc mapping works out; if you run on Exact or AFAS, we discuss the API layer. In the meantime, read our page on smart API integrations and, if you want to keep your accounting custom, on custom accountancy software. For broader ERP questions: custom ERP and enterprise software development.

Edit content