Build1 distinct publisher3 min readUpdated
Only the per-invoice UPO receipt evidences that an invoice reached the system. Integrations that store a session reference and call it delivered are filing invoices they cannot later prove.
The Engineer · Build desk

Compiled by The EngineerSomething wrong?How this is made
Poland's structured e-invoicing mandate is already in force: since 1 February 2026 for the largest companies, since 1 April 2026 for all active VAT payers, and from 1 January 2027 for everyone else, including the smallest and the VAT-exempt [1]. That means a large number of integrations built this year are now the system of record for tax evidence, and at least one common shortcut in them does not hold up.
The shortcut is the batch session. You can send one ZIP of XML files, hundreds at a time, and the session returns a reference number [4]. According to a developer who documented a production TypeScript integration on dev.to, that reference is not proof of anything about a specific document: the artefact that legally proves an invoice reached KSeF is the UPO, the Urzedowe Poswiadczenie Odbioru, and it is issued per invoice [5][6]. A session reference proves a session happened [6]. If a client is asked to produce evidence for one named invoice, a session reference is not it [6].
The engineering consequence is a fan-out you have to budget for. A batch of 200 invoices means one upload followed by 200 UPO fetches [7], so 201 requests, of which the receipt fetches are 200 [8]. The author's report is that this fetch phase, not the upload, dominates wall-clock time [7]. Any queue design that models submission as a single job and treats completion as the upload's HTTP response will look fast and produce unprovable invoices.
The mirror-image error is treating the batch as atomic. A document that fails semantic validation is rejected individually while the other 199 in the same session go through normally [9]. Roll the whole batch back on one error and you re-send invoices that were already accepted, which produces duplicate invoice numbers [10]. Per-invoice status tracking is the same requirement viewed from the other side: you need per-invoice state because the system gives you per-invoice outcomes.
What makes this a documentation problem rather than a reading problem is that the surrounding failures are also silent. The same write-up describes validation that demanded a buyer tax ID even though roughly three in four invoices in one real customer's book have none [11], a validator and a serialiser twelve lines apart in the same file encoding the same rule differently and disagreeing for months without anyone noticing [12], and a session key call that became async, returned undefined for all three fields when destructured synchronously, and surfaced several calls later as a server-side complaint about an empty encryption field [13]. On Deno, the node:crypto compatibility path reportedly downgraded the RSA-OAEP mask generation function to SHA-1, producing ciphertext the server rejects while nothing fails locally [14]. None of these throw where the bug is.
Two things to check. First, whether your integration can produce a UPO for an arbitrary invoice number on demand, and how far back; that is the query an auditor asks, and it is cheap to test now and expensive to discover you cannot answer. Second, the 1 January 2027 cohort [1], which is where the smallest filers arrive, mostly on packaged software written by someone else. The receipt-fetch fan-out is the part that gets quietly dropped when a vendor optimises for a fast-looking send.
Follow any of these and your For You feed starts watching them — no settings page required.
Ranked by verification strength, evidence, and original report placement.
The document that legally proves an invoice reached the system is the UPO (Urzedowe Poswiadczenie Odbioru), and it is issued per invoice.
A session reference proves only that a session happened; if a client is asked to produce evidence for one specific invoice, a session reference is not it.
Poland's mandatory structured e-invoicing applies since 1 February 2026 for the largest companies, since 1 April 2026 for all active VAT payers, and from 1 January 2027 for everyone else, including the smallest and VAT-exempt.
The system is called KSeF (Krajowy System e-Faktur); an invoice is sent as XML in a schema called FA(3), which KSeF validates, assigns a number, and for which it returns a signed receipt. There is an OpenAPI spec and official SDKs in C# and Java.
The author spent the year building a KSeF integration in TypeScript on Deno, and it now files invoices in production.
Invoices can be sent in a batch session as one ZIP of XML files, hundreds at a time, and the session returns a reference number.
Evidence-backed comparisons of source perspectives and observed adoption signals. Read the methodology
Which Builder, Operator, and Investor concerns the observed source mix emphasized—not a truth score.
Evidence, demonstrated adoption, hype gap, incentives, and confidence are assessed independently, each on its own current evidence. How these are measured.
Detailed but single-sourced practitioner account
The technical claims are unusually concrete for a single source — XML fragments, a sync-vs-await code pair, a named non-standard status behaviour, and a specific RSA-OAEP mask-generation downgrade — and they are internally consistent with a year of hands-on work that reached production. But every claim rests on one self-reported dev.to post with no citation to the KSeF specification, no regulation reference for the pivotal legal assertion about the UPO, and no independent replication. Quantitative details (fetch phase dominating wall-clock time, three in four invoices lacking a buyer tax ID) are unmeasured or drawn from a single customer's book.
Legally mandated context, one disclosed deployment
Adoption of the underlying system is compulsory rather than voluntary: the mandate is reported as already binding for the largest companies and all active VAT payers, with the remainder following in January 2027, which guarantees broad integration activity. Against that, the cluster evidences exactly one concrete implementation — the author's TypeScript/Deno client in production — and no invoice volumes, customer counts, or data on how many integrations follow the per-invoice UPO pattern the story advocates. Official tooling covering only C# and Java is the only other adoption signal.
Mostly proportionate, with one uncited legal absolute
The framing is restrained: it is a debugging retrospective with no product pitch, no benchmark superlatives, and explicit admissions of the author's own errors, which pushes toward alignment. The modest positive score comes from the headline being stated as legal certainty — that a session reference is not proof and the UPO is the document that proves delivery — while the cluster supplies no regulation, official guidance or second source for that proposition, and from the unquantified assertion that receipt fetching dominates wall-clock time.
Practitioner credibility-building with adjacent commercial stake
The disclosed incentive is that the author has invested a year in building a KSeF integration that now files invoices in production and is publishing hard-won expertise about it, which aligns with reputational and business-development benefit from being seen as the person who knows KSeF's undocumented edges. The article closes by laying out integration approaches, which is consistent with advisory positioning. No pricing, product, sponsorship or funding disclosure appears in the cluster, so nothing stronger than a moderate, partially self-disclosed alignment can be scored.
Credible first-hand detail, uncorroborated
Confidence is moderate: the operational advice is specific, internally coherent and grounded in a production system, and the failure modes described (silent async destructuring, compat-layer crypto downgrade, non-atomic batch semantics) are the kind that are easy to verify locally. It is held down by the cluster having a single publisher, a single implementer, no official documentation or regulatory citation for the legal core, and no measurements behind the performance and prevalence figures.
security
Bring Your Own Runtime: Sophos MDR maps a repeatable Deno-based intrusion chain1 distinct publisher
build
263 green tests, every value undefined: the schema mirror that agreed with itself1 distinct publisher
build
A build step instead of a backend: 1,025 records, 8 locales, no runtime API1 distinct publisher
build
Allow-list the closed set, block-list the open one: 193 thin geo pages, one gate1 distinct publisher
Distinct publishers with included, body-backed reporting in this cluster.
dev.to
1 article · August 15, 2026