KSeF Faktury
EN
Join the start list

Duplicate KSeF invoices from order status changes

In short: a duplicate invoice in KSeF (Krajowy System e-Faktur, the Polish National e-Invoicing System) usually appears when a plugin or order manager issues an invoice every time an order enters a given status, and someone moves the status back and sets it again. KSeF only rejects an invoice with the same number, so two invoices with different numbers both go through. Invoices cannot be deleted from KSeF: you issue a correction to zero for one of them. You prevent it with a single trigger, a "does this order already have an invoice?" check and one tool that sends to KSeF.

Where two invoices for one order come from

Automatic invoicing in stores follows a simple rule: "when the order enters status X, issue an invoice". Trouble starts when the status changes more than once:

This is not theory. In October 2026, the owner of an integration agency described on LinkedIn a case where one status change back and forth in a multichannel store produced two KSeF invoices. The builders of another order manager described a bug in which a status change triggered a plugin that issued 28 unnecessary invoices; they managed to stop them before they reached KSeF.

Why KSeF does not stop the duplicate

KSeF checks for duplicates narrowly. It rejects an invoice with error code 440 ("Duplikat faktury", duplicate invoice) when the seller's NIP (Polish tax ID), the invoice type and the invoice number all match (KSeF 2.0 API documentation, invoice verification). A second invoice for the same order usually has the next number in the series, so for KSeF it is a completely new invoice.

An accepted invoice cannot be deleted or edited. The Ministry of Finance says plainly that once accepted by KSeF, an invoice becomes a legal document that cannot be changed, and errors are fixed with a correction invoice (MF FAQ, category "Wystawianie i otrzymywanie faktur", question 18). The KSeF 2.0 API has no delete operation either. The buyer sees both invoices in KSeF as soon as the KSeF numbers are assigned, because that is when an invoice counts as received (Article 106na(3) of the Polish VAT Act).

How to fix a duplicate that is already in KSeF

  1. Decide which invoice stays. Usually the first one, because its KSeF number may already have reached the customer, the accountant or a transfer title.
  2. Check that both cover the same sale. Compare the order number, amounts and the buyer's NIP. If the second invoice has a different NIP, that is a different problem (wrong buyer).
  3. Issue a correction to zero for the second invoice. The correction quotes the KSeF number of the corrected invoice (Article 106j(2)(2a)) and zeroes all lines. The legal ground is an error (Article 106j(1)(5)). As the reason, write for example "Invoice issued in error, duplicate of invoice no. ...". General rules: KSeF corrections and refunds.
  4. Tell the buyer. Write which invoice is the right one, so the customer does not pay twice or deduct VAT from both. In KSeF the tax office sees the whole chain of documents, so both sides should book it the same way.
  5. Agree the correction period with your accountant. This is the correction of an error, not a discount or a return, so confirm when it goes into the JPK (Polish VAT return file).
  6. Remove the cause before the order changes status again. Otherwise a third invoice is only a matter of time.

The number of corrections is not limited (MF FAQ, same category, question 22), so 28 duplicates mean 28 corrections. With many of them, issue them programmatically from a list of KSeF numbers to correct, and review that list with your accountant before sending.

If KSeF rejected the file, there is no invoice and nothing to correct (MF FAQ, question 20). If an invoice is still "processing", do not send it again by hand; wait for the result.

How to prevent it: rules for every store

Checklist per platform

Platform or tool What to check
WooCommerce on which status the plugin issues the invoice; whether re-entering that status issues another; whether the order stores the invoice number and KSeF number
PrestaShop which status has the invoice option ticked; whether the KSeF module sends the PrestaShop invoice (with its number) or issues its own; whether it reacts to every status change
Base (BaseLinker) automatic actions that issue invoices: event, conditions, rule order; whether a store plugin also issues invoices; do not resend "processing" invoices by hand
Apilo automatic tasks with the "issue sales document" action; add the condition "Czy zamówienie ma wystawioną fakturę?" (does the order already have an invoice?); one number series per channel
Your own integration or API an idempotency key on every call; invoice uniqueness per order number; retries only with the same key

Platform details: KSeF for WooCommerce, KSeF for PrestaShop and BaseLinker and KSeF.

How it works with us

In KSeF Faktury, one order yields one invoice, and repeated sends of the same order are recognised. Our API states the rule explicitly: an invoice is unique per order identifier, so a second call returns the existing invoice instead of issuing a new one, and the Idempotency-Key header makes retries after a network error safe. Technical description: idempotency in the API.

Frequently asked questions

Can I delete a duplicate invoice from KSeF?

No. An invoice accepted by KSeF cannot be deleted or edited. You correct the unnecessary one to zero.

Shouldn't KSeF detect that it is the same sale?

KSeF compares only the seller's NIP, the invoice type and the invoice number. It does not know your store's order number, so it treats two invoices with different numbers as two different sales.

Which invoice should stay, the first or the second?

Usually the first, because its number may already be with the customer or in a payment. What matters is keeping the one the customer knows and telling them clearly.

Does a duplicate consumer invoice also need a correction?

If an invoice for a private person was sent to KSeF, it is an accepted invoice and you correct it too. You do not have to send consumer invoices to KSeF at all, though: KSeF invoice for consumers.

This article is general information and is not tax advice.

Sources

Status as of 26 October 2026.

KSeF Faktury

Join the launch list

We will write once, on launch day in the Shopify App Store (December 2026), and help you set up.