Pulls from Poland's KSeF on a schedule, accepts PDFs by inbound email, categorizes with ML, flags duplicates, and hands clean data to your accountant — or to your next dashboard via API. Ship it yourself or let us run it.
As of 2026, every Polish company has to pull invoices from Krajowy System e-Faktur (KSeF), reconcile them with the PDFs that still arrive by email, and hand the whole mess to their accountant. Doing that by hand through the government portal is a daily tax on your time.
KSeF Hub is the missing operating layer: a proper UI, a REST API, ML that learns your categories, and permissioned access for the people who help you run the business. It's open source so you can audit it, fork it, or run it yourself — and managed if you'd rather not.
From ingest to export. Each piece works independently; together they replace the spreadsheet-plus-email workflow most companies run today.
Scheduled pulls from the government e-invoice system. Certificate stays on your server; no browser logins, no stale sessions.
Add as many NIPs as you like. The admin switches context in one click — no separate logins per entity.
Forward an expense to your company inbox. We extract NIP, amounts, dates with OCR and drop it into the same ledger as KSeF rows.
Models train on your company's corrections, not a global dataset. Predictions at ≥80% confidence auto-apply; anything lower arrives flagged for review. Never predicts a category you haven't configured.
KSeF issues corrections (faktura korygująca) as separate documents. Each is modeled with a link to the original, a reason, and the affected period — one timeline, not two unrelated rows.
KSeF invoices stay pending until a human signs off. Team uploads with complete extraction can auto-approve on arrival — opt-in per company. Every row is pending, approved, rejected, or excluded (kept for audit, off the books).
Export Polish bank-transfer CSVs (rachunek_zleceniodawcy) from approved expenses. Multi-currency, per-company bank accounts, bulk select across vendors. Mark paid in bulk; the ledger updates atomically.
Upload once, expiry tracked, renewal reminders. Stored encrypted on your server, never in a third-party cloud.
Scoped read + export. Your accountant pulls monthly packages directly; no more zipped email attachments.
Share a single row with a stakeholder without exposing the rest. Approver, editor, viewer — revoke in one click.
Who synced, who approved, who exported, who changed the category. Every action is timestamped and attributable.
Every row has an endpoint. Pipe into your BI stack, trigger your own workflows on new approvals, or build a custom UI on top.
KSeF rows, emailed PDFs, and manual foreign invoices all land in the same table with the same fields. Sources are marked with a single-character dot so you can spot outliers without a legend lookup.
| Number | Seller | Date | Amount | Status |
|---|---|---|---|---|
| FV/2026/04/118 | Orange Polska | 18 Apr | 1,427.00 / 1,160.16 | approved |
| inv-ff3d1b | Cloudflare Inc. | 17 Apr | 820.00 / 820.00 | pending |
| 2026-04-17-002 | Grupa Maspex | 17 Apr | 314.00 / 255.28 | duplicate |
| FV/2026/04/071 | Linear, Inc. | 14 Apr | 960.00 / 780.49 | approved |
| API-2026-0042 | Stripe Payments | 12 Apr | 42.00 / 42.00 | excluded |
Read invoices, trigger syncs, mark payments, subscribe to events. Everything the admin UI does is available over HTTP.
# Fetch this month's approved expenses for one NIP
curl https://ksef-hub.local/v1/invoices \
-H "Authorization: Bearer $KSH_TOKEN" \
-G -d "company=5252344078" \
-d "status=approved" \
-d "type=expense" \
-d "date_from=2026-04-01"
# ->
{
"data": [
{ "number": "FV/2026/04/118",
"seller": "Orange Polska",
"brutto": 1427.00,
"category": "telecom",
"confidence": 0.94 }
],
"page": { "next": "cursor=inv_5f1b" }
}
KSeF Hub is licensed AGPL-3.0. Read every line, check every migration, run it in your own datacenter. If you improve it, upstream the patch — or fork it and ship your own flavour.
Copyleft. Use it, host it for yourself — if you offer it as a service, your modifications go back to the community.
A BEAM server. Handles thousands of syncs concurrently on a single small VM. Boring tech, long runway.
One .env, one container per service. Postgres, Oban, the Phoenix app, an OCR worker. Bring your own reverse proxy.
Issues, RFCs, and a weekly open call. Built by founders who'd rather not touch the government portal ever again.
Same code, same features. Pick how much you want to operate.
KSeF (Krajowy System e-Faktur) is Poland's national e-invoice system. From 2026 every registered company must issue and receive invoices through KSeF. KSeF Hub sits on top of it and handles the integration, so your team doesn't have to touch the government portal.
Yes. KSeF Hub is AGPL-3.0 licensed and ships as a docker-compose stack: Postgres, the Phoenix app, and a couple of sidecars. Bring your own reverse proxy and you're live in under an hour. There's also a managed version if you'd rather not operate it yourself.
Person certificates (tied to PESEL) and company (NIP) certificates. Certificates are user-scoped, so one uploaded cert authenticates KSeF sessions for every company the user has access to. Certificates stay encrypted at rest on your server — never in a third-party cloud.
Yes. KSeF Hub models the full KSeF invoice taxonomy: standard, corrections, advances, simplified, and settlements. Correction invoices are linked to their originals with a reason and the affected period — one timeline, not two unrelated rows.
Models train on your company's corrections, not a global dataset. Predictions at ≥80% confidence auto-apply; anything lower arrives flagged for review. The model never predicts a category that isn't already on your list.
Yes. Every row in the ledger is exposed over HTTP. Endpoints for reading invoices, triggering syncs, approving payments, and webhooks for invoice.created, invoice.approved, and sync.failed. Bearer-token auth.
Clone the repo, spin up a container, point it at your KSeF certificate. Your ledger is live in under an hour.