FakturFlow – E-Invoicing for KSeF

Beschrijving

KSeF (Krajowy System e-Faktur), Poland’s national structured e-invoicing system, became mandatory for large taxpayers on 1 February 2026 and for micro, small and medium businesses on 1 April 2026. Penalties for not issuing structured invoices apply from 1 January 2027 — the same date the last wave (smallest taxpayers, under 10,000 zł/month invoiced turnover) joins the mandate. If you sell B2B through WooCommerce and issue invoices to businesses, you need KSeF now.

FakturFlow is a standalone plugin: it talks directly to the official Ministry of Finance API 2.0. No external accounting system, no intermediary, no per-invoice fees. Generate, validate and submit a FA(3) structured invoice straight from the order screen — one click per step.

Wtyczka łączy Twój sklep WooCommerce bezpośrednio z KSeF przez oficjalne API 2.0 Ministerstwa Finansów — pełny polski opis i tłumaczenie interfejsu (pl_PL) są dołączone do wtyczki.

Features

  • Generate FA(3) structured invoice XML from any WooCommerce order.
  • Validate against the official Ministry of Finance schema before sending.
  • Submit to KSeF (test, demo and production environments) using the official API 2.0.
  • Track submission status and download the UPO (Urzędowe Poświadczenie Odbioru — official proof of receipt).
  • KOD I verification QR code, generated per the official Ministry of Finance specification.
  • NIP field at checkout (classic and block checkout) with checksum validation — orders with a NIP are detected as B2B automatically.
  • Correction invoices (faktury korygujące) from refunds — every refund gets its own KOR document referencing the original invoice by KSeF number; generate, send and download its UPO from the order screen.
  • Invoice PDF for the buyer, built from the invoice exactly as KSeF holds it, with the KOD I code — attached to the order emails and downloadable from My Account (signed links for guests).
  • Consumer (B2C) invoices through KSeF, if you want them: off, on request (“I want an invoice” checkbox at checkout) or for every order.
  • Payment terms on the invoice: paid date or due date, payment method and your bank account.
  • Split payment (mechanizm podzielonej płatności) marked automatically for annex 15 goods on B2B invoices above 15 000 zł.
  • Seller address and bank account in the plugin settings, independent of the WooCommerce store address.
  • KSeF token stored encrypted at rest, never logged.
  • HPOS (custom order tables) and checkout-blocks compatible.
  • Full Polish (pl_PL) translation included.

Why FakturFlow?

  • Direct connection, no middlemen. Most KSeF options for WooCommerce route your invoices through an external accounting SaaS or a vendor’s cloud. FakturFlow talks straight to the Ministry of Finance API — your invoice data never touches a third-party server.
  • Free means free. No invoice limits, no per-invoice fees, no monthly subscription for the core flow. Accounting SaaS plans start around 100-360 zl/year and meter your invoices; here the full manual flow costs nothing, forever.
  • One plugin, not a plugin + paid add-on. You don’t need a separate invoicing plugin as a base — KSeF is not a bolt-on here, it’s what this plugin is built around: FA(3) with local XSD validation, UPO, the KOD I verification QR, and corrections.
  • Built for modern WooCommerce. HPOS, checkout blocks, a checksum-validated NIP field in both checkout variants.
  • Private by design. Encrypted token storage, zero telemetry — the only server your store talks to is the Ministry’s.

Who it’s for

Any WooCommerce store that invoices Polish businesses and must comply with the KSeF mandate — without a SaaS subscription, without per-invoice fees, and without needing a separate accounting package. Consumer (B2C) invoices are optional in KSeF: by default consumer orders flow through the normal checkout untouched, and you can switch KSeF invoices for consumers on when you want them.

FakturFlow Pro (separate add-on)

When invoice volume grows, FakturFlow Pro automates the whole flow: automatic submission when an order is paid (with retries and backoff), automatic correction invoices from refunds, an offline24 mode that keeps issuing invoices when KSeF is unreachable and delivers them within the statutory deadline, and a compliance dashboard with a full audit log and CSV export. This Free plugin always covers manual generate/validate/send, corrections, UPO, the NIP field and the QR code — no functionality is ever removed to push the paid tier.

Third-party libraries

This plugin ships the following open-source runtime libraries, all GPL-compatible. They are bundled under the plugin’s own PHP namespace (FakturFlow\Vendor\), so they never clash with the same libraries bundled by other plugins:

External services

This plugin connects to KSeF (Krajowy System e-Faktur), the official structured e-invoicing API of the Polish Ministry of Finance. It is required for the plugin’s core purpose: submitting structured invoices, checking their status and downloading UPO confirmations.

  • What is sent: invoice data derived from the WooCommerce order (seller NIP, name and address, buyer NIP — or none for consumers — name and address, line items, amounts, VAT, payment terms and your bank account if set), and your KSeF authentication token during session handshake. Data is sent only when you explicitly generate/send an invoice or refresh its status from the order screen (or when a Pro add-on triggers the same documented actions).
  • Where it is sent, depending on the environment chosen in settings: https://api.ksef.mf.gov.pl (production), https://api-demo.ksef.mf.gov.pl (demo), https://api-test.ksef.mf.gov.pl (test).
  • The KOD I verification QR code embeds a public verification link pointing to https://qr.ksef.mf.gov.pl (or the matching qr-demo/qr-test host), per the official verification-code specification. The link is only opened when someone scans the QR code.
  • Service provider: Ministry of Finance of the Republic of Poland. Service information: https://www.podatki.gov.pl/ksef/ — privacy/data-processing information: https://ksef.mf.gov.pl/

No other external service is contacted. The invoice PDF is generated on your own server and sent to the buyer with your store’s own emails. The plugin sends no telemetry.

Schermafbeeldingen

Installatie

  1. Install and activate the plugin (WooCommerce must be installed and active).
  2. Go to WooCommerce KSeF Invoices.
  3. Choose the environment — start with Test.
  4. Enter your seller NIP, name and address (prefilled from the WooCommerce store address), and your bank account if you want it on unpaid or transfer invoices.
  5. Log into the KSeF web application (https://ksef.mf.gov.pl/) with your Trusted Profile or qualified certificate and generate a token with InvoiceWrite and InvoiceRead permissions. Paste it into the settings — it is stored encrypted.
  6. Use Test connection to confirm your hosting allows outgoing HTTPS to KSeF.
  7. Open a B2B order (one with a buyer NIP), generate and validate the FA(3) invoice, send it to KSeF and download the UPO. Once a full test cycle works, switch the environment to Production.

FAQ

Does the plugin work without an accounting system?

Yes. It talks directly to the official KSeF API 2.0 of the Ministry of Finance — no intermediary and no per-invoice fees. You generate, validate and submit FA(3) invoices from the WooCommerce order screen.

What about consumer (B2C) orders?

By default only orders with a buyer NIP (tax ID) go to KSeF. Under WooCommerce KSeF Invoices Consumer invoices you can also issue KSeF invoices to consumers: on request (the buyer ticks “I want an invoice” at checkout) or for every order. A consumer invoice then goes to KSeF without a tax ID, and the buyer receives the PDF with its verification code.

Where does the buyer get the invoice?

Once KSeF accepts the invoice, the PDF is attached to the “Completed order” and “Order details” emails, and the email contains a download link (valid for 30 days, also for guest orders). Logged-in customers can download it any time from My Account. The PDF is generated on your server from the invoice exactly as KSeF holds it, with the KOD I verification code. If the invoice was accepted after the order email went out, the order gets a note — resend it with “Send order details to customer”.

Does it handle split payment (MPP)?

Yes. Tick “Split payment (annex 15)” on products listed in annex 15 to the VAT Act. A B2B invoice above 15 000 zł that includes such a product is marked “mechanizm podzielonej płatności” and carries your bank account (set it under Payments).

Which orders can FakturFlow invoice?

Orders in PLN from buyers in Poland — with a NIP, or consumers when you turn consumer invoices on — issued by a store based in Poland. Orders in other currencies and orders from buyers outside Poland are refused with a clear message on the order screen (nothing is numbered or sent) — foreign B2B invoices (EU VAT ID, reverse charge, WDT/export) and other currencies are planned.

Does it work with HPOS and the block checkout?

Yes. The plugin is fully compatible with High-Performance Order Storage (custom order tables) and with the Checkout block — the NIP field is registered through the Additional Checkout Fields API and behaves identically in both checkout variants.

Where do I get a KSeF token?

Log into the KSeF web application (https://ksef.mf.gov.pl/) with your Trusted Profile (Profil Zaufany) or qualified certificate, go to permissions management, and generate a token with InvoiceWrite and InvoiceRead permissions. Paste it into the plugin settings (WooCommerce KSeF Invoices) — it is stored encrypted.

Does the plugin send data to third parties?

No. Invoice data is sent only to the official Ministry of Finance API (test, demo or production environment, as chosen in your settings). The one exception is the verification link encoded in the KOD I QR code itself — when scanned it points to the Ministry of Finance’s public invoice-verification lookup, per the official verification-code specification. See the “External services” section below for the exact endpoints.

Does uninstalling the plugin delete my issued invoices?

No. Generated invoice and UPO XML files (under wp-content/uploads/ksef-invoices/) are legal/tax records and are not deleted on uninstall — only the plugin’s own settings (environment, seller data, token) are removed. If you also want the stored files gone, remove them manually after archiving/exporting them.

Beoordelingen

Er zijn geen beoordelingen voor deze plugin.

Bijdragers & ontwikkelaars

“FakturFlow – E-Invoicing for KSeF” is open source software. De volgende personen hebben bijgedragen aan deze plugin.

Bijdragers

Vertaal “FakturFlow – E-Invoicing for KSeF” naar jouw taal.

Interesse in de ontwikkeling?

Bekijk de code, haal de SVN repository op, of abonneer je op het ontwikkellog via RSS.

Changelog

0.3.0

  • New: invoice PDF for the buyer, built from the invoice exactly as KSeF holds it, with the KOD I verification code. Attached to the “Completed order” and “Order details” emails (can be turned off), with a signed download link in the email and a download in My Account. Admins get “Download PDF” for invoices and corrections. The template can be overridden from the theme (fakturflow/invoice.php).
  • New: consumer (B2C) invoices through KSeF — off (default, unchanged behaviour), on request with an “I want an invoice” checkbox at checkout, or for every order.
  • New: payment terms on the invoice — paid date or due date (configurable payment term), payment method and your bank account.
  • New: split payment. Mark annex 15 products; B2B invoices above 15 000 zł that include them are marked “mechanizm podzielonej płatności”.
  • New: seller address, bank account and payment term in the plugin settings. On update the address is copied once from the WooCommerce store address.
  • Change: the bundled libraries now use the plugin’s own namespace, so they can no longer clash with the same libraries in other plugins.
  • Developer: KSEFI_Invoice_Service::eligibility(), ksefi_payment_form_map, ksefi_pdf_locale and ksefi_pdf_template filters.

0.2.7

  • Fix: invoice numbers are now reserved under a database lock. Invoices created at the same moment (for example by the Pro auto-submit queue) could previously receive the same number.
  • Fix: a number is taken from the series only after the invoice passes validation, so failed attempts no longer leave gaps. Re-generating an invoice keeps its number.
  • Change: orders in currencies other than PLN and orders from buyers outside Poland are refused with a clear message instead of being sent with incomplete data. Support for both is planned.
  • Fix: the buyer and seller country code is taken from the address instead of always being PL.

0.2.6

  • New: redesigned settings page — Connection and Seller cards plus a Status panel that shows at a glance whether the KSeF token is saved, the seller NIP is valid, which environment is active and when the connection was last tested (with the error code if it failed). Works on mobile.
  • Improved: the Polish translation now covers every string again, including the Pro section and the review request.
  • Developer: new ksefi_invoice_rejected action, fired when a KSeF status check reports the invoice as rejected.

0.2.5

  • New: a one-time, dismissible request to leave a review on WordPress.org. It appears only a week after your first invoice is accepted by KSeF, only to shop managers and only on the plugin’s own screens. “Maybe later” snoozes it for 30 days, “Don’t ask again” hides it for good. Nothing is sent anywhere.

0.2.4

  • Tested with WordPress 7.1 (verified on 7.1.1 with WooCommerce 11.1). No functional changes.

0.2.3

  • New: a short FakturFlow Pro section on the settings page and a “Go Pro” link on the plugins list (both hidden automatically when the Pro add-on is active).

0.2.2

  • Renamed again to resolve a follow-up wp.org review finding: “WooCommerce” is not permitted in the plugin name or slug at all, so it’s dropped from both. New slug: fakturflow-ksef.

0.2.1

  • Renamed to resolve a wp.org review trademark/slug finding (new slug: fakturflow-ksef-and-woocommerce). Upgraded chillerlan/php-qrcode to 6.0.1 and hardened the KOD I QR output with wp_kses().

0.2.0

  • Initial release: FA(3) generation with offline schema validation, direct KSeF API 2.0 submission with UPO download, order metabox and status column, checkout NIP field (classic + blocks), KOD I verification QR, correction invoices (faktury korygujące) from refunds, encrypted token storage.