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 will have to 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's 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.

Since 2015 we have been building custom integrations for ERP and invoicing systems. For KSeF, that means: schema mapping from your source system to FA(3), token-based authentication against the Ministerstwo Finansów environment, a robust retry and error layer, and archiving that meets Polish statutory retention requirements. No tax advice, we leave that to your tax adviser, but the technology that works on the first day KSeF becomes mandatory.

Our role doesn't stop at "the XML goes through". We help you think through the impact on your accounts receivable, the timing of credit notes and corrections, and how to make sure rejected submissions don't quietly sit in a queue. Building for KSeF is largely about handling exceptions: a standard invoice is easy, but an exception costs you money if it isn't handled correctly.

Three types of KSeF integration.

Which one fits depends on your invoice volume, your source systems and how many exceptions your outgoing invoice flow has. We'll advise on the right option in 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 a single Polish entity. We build a thin 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 flow. We build a middleware layer (Azure, GCP or on-premises) that consumes IDoc/EDIFACT, transforms it to FA(3), handles KSeF submission and writes the result back as a confirmation or error. Includes operational monitoring and resubmission of 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 see rejected invoices, outstanding 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 Ministerstwo Finansów.
  • 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 a qualified certificate or token, with automatic renewal and key rotation.
  • Archiving & audit logEncrypted long-term storage in line with the Polish statutory retention period of ten years, with an audit log for inspection by the tax authorities or your accountant.
  • Operations dashboardVisibility of submitted, accepted, rejected and pending invoices, with one-click resubmission for rejected submissions.
  • Codebase + runbookFull source code, build instructions and an incident runbook, so your IT team can handle escalations themselves.
  • Managed service contract (optional)Monitoring, security patches, schema updates whenever KSeF releases new FA versions, and ongoing development for a fixed monthly fee.

When a KSeF integration is the right choice.

Four situations in which we support companies. If you recognise one of them, we'd be happy to talk through the scope with you.

Obligation

A 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 accept only invoices submitted via KSeF, so your own ERP needs to be able to communicate with it.

Export flow

Dutch company with B2B exports to Poland

You invoice Polish B2B customers from the Netherlands. Depending on your VAT position and the customer's status, this flow also falls under KSeF. A hybrid setup, with 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 flow. The step from IDoc to FA(3) XML is not trivial. We build the mapping and the middleware in between, so your SAP team doesn't need to touch the standard.

Scale

Multiple entities, multiple ERPs

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

Risk

Your existing connector doesn't cover it

You already have a KSeF button in your invoicing package, but the vendor offers no support for your own layout, IDoc fields or correction flows. A thin custom layer on top of the connector bridges the gap without you having to replace 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 came back and who viewed it. A standard ERP log is too coarse for that, so we deliver a dedicated audit layer.

How a KSeF project works.

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 your invoice flow contains (credit invoices, advance payments, corrections).

2

Schema analysis and data mapping

We lay your outbound invoice data alongside the FA(3) XSD schema. Fields that don't match one-to-one get 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, which is exactly where people searching for "ksef sandbox" end up, test the signature flow and submission, and work through rejected scenarios together before going to production.

4

Pre-validation and error handling

Every invoice goes through pre-validation against the schema, plus the KSeF business rules we know of. This prevents rejections from only becoming visible after submission. Rejected submissions get a clean retry flow with an audit log.

5

Setting up go-live & archiving

A phased transition from sandbox to production, archiving set up in line with Polish retention requirements, 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, adapt 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 has been announced as a mandatory system for B2B invoices in Poland. The Polish government has moved the exact start date several times; the latest plan is a phased mandate from 2026 for large taxpayers, followed by the rest of the SME sector. We keep an eye on the roadmap and plan your integration so that it is working in the sandbox well before your deadline. It's important to realise that once the mandate takes effect, the tax authority no longer accepts a paper or PDF invoice as a valid tax document. Anything you send outside KSeF formally doesn't count: your customer can't reclaim the VAT, and you effectively have no recognised invoice.
What is FA(3) and why is the 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 the invoice after schema validation. Alongside pure schema checks, business rules also apply: certain combinations of VAT rates and invoice types are not allowed, NIP numbers must validate against the Polish register, and correction invoices must reference the original invoice via UUID. We run this validation on our side too, before submission, so rejections become rare.
How do you connect SAP IDoc INVOIC to KSeF?
With 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 confirmation of receipt or the rejection back to SAP, as an IDoc status, a custom Z-table or an email notification, depending on what your SAP team prefers. We explicitly keep your SAP system clean: no Z-development inside 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 run yourself 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 and run a full end-to-end test with real invoice data. Only once the signature flow, submission, callback and error paths all work do we switch to production. The switch itself is a config change, not a code change. In the sandbox we also deliberately simulate failure scenarios: a wrong VAT rate, a missing NIP, a timeout on the KSeF side, a revoked signature. We only go live once those paths are handled cleanly.
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 software and KSeF lives as a separate service, so an upgrade of Exact or AFAS doesn'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. That keeps the AFAS environment within your AFAS consultant's scope and the KSeF layer within ours.
Does this work alongside Peppol for other EU countries?
Yes. Peppol is emerging as a universal e-invoicing network for the EU, while Poland has its own mandatory system in KSeF. Many multinationals run into this parallel world. We build routing logic that chooses between Peppol, KSeF or another mandate (for example SDI in Italy or FacturaE in Spain) based on the recipient's country and VAT position. One platform, multiple channels, one shared audit log. That makes a huge difference to management: one integration team, one set of monitoring dashboards, and one place where the finance controller checks rejected invoices.
What about archiving and the retention obligation?
Polish tax legislation requires invoice data to be archived for the long term, typically ten years. We set up encrypted storage in your cloud or ours, with immutable (write-once) logging and an audit trail showing who viewed or exported which invoice, and when. Access runs through your IdP (Azure AD, Okta, Google Workspace), so it falls within your existing security policy. Alongside the FA(3) XML, we also store the corresponding KSeF UUID, the acceptance timestamp and, where relevant, the original source IDoc or API response, so you can produce the full trail during an audit.
What if KSeF rejects our invoice: who corrects what?
Rejections come in all shapes: schema errors (a field that doesn't match), business-rule errors (invalid NIP, wrong 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 readable explanation, business-rule errors trigger a manual review, and technical errors are retried automatically with exponential backoff. Nothing disappears into a log file that nobody looks at: everything appears in the ops dashboard with an action button.
What does a KSeF integration cost?
That depends heavily on the scope: a single ERP and a single entity is a short project, while 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 come back to you with a sprint budget. No open-ended hours; fixed budgets per sprint. We also explicitly name which risks fall outside the scope for now (for example, new FA versions that Poland only publishes later) and how we handle them under 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