Obtain a KSeF authentication token by calling the session initiation endpoint with your NIP and a signed challenge; the KSeF 2.0 API uses OpenAPI 3.0.4 and all session calls require a valid token in the SessionToken header.
Build each invoice as a valid FA_VAT(3) XML document; FA(3) is the only accepted schema from 1 February 2026 — FA(2) documents will be rejected.
Wrap multiple FA(3) invoices in a batch envelope according to the KSeF 2.0 integration guide and POST the batch payload to the batch invoice submission endpoint documented in the interactive KSeF 2.0 API portal.
Poll the batch status endpoint with the returned reference number until the status changes to PROCESSED or REJECTED.
For each accepted invoice, retrieve the UPO (Urzedowe Poswiadczenie Odbioru) from the UPO endpoint using the invoice's KSeF number — the UPO is the legally binding receipt of acceptance.
Store the KSeF number and UPO for each invoice; these are required for audit and buyer reference.
Known gotchas
FA(2) documents are retired as of the February 2026 mandate; submitting FA(2) XML will cause the entire batch to fail — validate schema version before sending.
Large taxpayers are subject from 1 February 2026; other taxpayers from 1 April 2026 — verify your applicability date before enabling mandatory mode.
Batch size limits and rate limits are documented in the KSeF 2.0 integration guide; exceeding them returns a 429 and requires exponential back-off before resubmission.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp