If you sell to Polish businesses and have the KSeF add-on connected, YNS files your invoices with KSeF – the Polish national e-invoicing system – for you. Paid orders from a buyer with a tax ID are filed automatically. This page covers what you can do by hand from an order: issue the invoice when you decide, correct it later, and send it to the buyer.

> **Before you start:** Connect the KSeF add-on in **Add-ons → KSeF** (environment, token and your company NIP) and turn invoices on in **Settings → Invoices**. See [Browse and connect add-ons](/help/integrations/add-ons) and [Generate invoices](/help/orders/invoices). KSeF works for stores that sell in PLN.

## Issue an invoice and send it to KSeF

Open the order. Under the order status you'll find **Issue invoice** – or **Send invoice to KSeF** if the order already has an invoice that hasn't been filed yet.

The button opens a preview of the invoice exactly as it will be filed:

- the buyer – company, name, address and tax ID
- the invoice number (or a note that it's assigned when you confirm), the issue date and the sale date
- every line with its quantity, VAT rate, and net, VAT and gross amounts, plus the totals

Check it, then click **Issue and send to KSeF**. YNS numbers the invoice (if it doesn't have a number yet) and sends it to KSeF.

You don't have to wait for payment. This is the way to invoice a wholesale order paid by bank transfer, for example, at the moment you choose. If the order isn't marked as paid yet, the preview reminds you – the invoice is still filed when you confirm. When the order is paid later, nothing is filed a second time.

### When you can't issue it yet

The preview says what's missing and won't let you confirm until it's fixed:

| What you see | What to do |
|--------------|------------|
| The buyer has no valid tax ID | KSeF invoices need a Polish NIP or an EU VAT number. Click **Edit customer details** and add it. |
| Invoices are turned off | Turn them on in **Settings → Invoices**. |
| A test order on the production environment | Test orders are never filed with the real KSeF. Use the TEST or DEMO environment to try things out. |
| The order was sold at the counter or through Base | It's invoiced where it was sold, not here. |
| The invoice can't be built | The message names the problem – often an incomplete address or a VAT rate KSeF doesn't accept. |

If the button doesn't appear at all and you see **Set up KSeF e-invoicing** instead, the add-on isn't connected or is switched off.

### Follow the status

The order's **KSeF** section shows each document and its status:

- **PENDING** / **SUBMITTED** – on its way to KSeF
- **ACCEPTED** – filed, with the KSeF number next to it
- **REJECTED** – with a short explanation and the full error underneath. Fix the cause and click **Retry**.

> **Note:** Once an invoice is accepted, it's a legal document. You can't edit the order's items or addresses any more – changes go through a correction invoice or a refund.

## Issue a correction invoice

When the order's invoice is accepted, the button under the order status becomes **Issue correction**. Use it when something changes without a refund in YNS – a price agreed with the buyer, an item returned and settled outside the store, a wrong VAT rate, or a wrong buyer address.

The form starts from the invoice as KSeF holds it now, including any earlier corrections. You can:

- change the **quantity**, the **unit price (gross)** or the **VAT rate** of any line
- **Add line** or **Remove** a line
- click **Correct to zero** to reverse the whole invoice
- tick **Correct buyer details** to fix the buyer's name, company or address

Enter the **Reason for correction** – it's required and it's printed on the correction. Below the lines you'll see the totals **Before**, **After** and the **Difference** (net, VAT and gross), so you know exactly what the correction changes. It can lower the amount (a credit note) or raise it.

Click **Issue correction and send to KSeF**. The correction gets its own number – the original number followed by `/KOR/1`, `/KOR/2` and so on – and appears in the KSeF section with its own status.

A few rules worth knowing:

- **The buyer's tax ID can't be corrected.** If the NIP on the invoice was wrong, correct the invoice to zero and issue a new one.
- **One correction at a time.** While a correction is still on its way to KSeF, wait until it's accepted or rejected before issuing the next one.
- **Each correction builds on the previous ones.** The next correction always starts from the invoice as already corrected.

## Download the PDF and email it to the buyer

Every accepted invoice and correction in the KSeF section has a **PDF** link and an **Email to buyer** button. The email goes to the order's customer email address, with the PDF attached and the KSeF number in the message. You can send it again whenever you need to.

## Refunds and corrections

When you refund an order with an accepted e-invoice, YNS still files the correction invoice for the refund automatically.

Two exceptions:

- **The order already has a correction you issued by hand.** The refund may be exactly what that correction covered, so YNS doesn't file a second one on its own. The refund's correction shows as rejected with an explanation. If your correction doesn't cover the refund, click **Retry** to file it anyway.
- **The refund can't be matched to invoice lines** – a partial refund of a custom amount, or refunding "the rest of the order" after an earlier partial refund. The correction shows as rejected and points you to **Issue correction**, so you can say which lines changed.

See [Issue refunds and handle returns](/help/orders/refunds-and-returns) for the refund itself.

## FAQ

### Do I have to issue invoices by hand?

No. Paid orders from buyers with a valid tax ID are filed automatically. Issuing by hand is for when you want to decide the moment – for example, for orders paid by bank transfer.

### Can I invoice a consumer through KSeF?

Not yet. KSeF filing needs the buyer's NIP or EU VAT number. Orders without one still get your regular invoice – see [Generate invoices](/help/orders/invoices).

### Can I change an accepted invoice?

Not directly. An accepted e-invoice is a legal document, so every change goes through a correction invoice.

### Why does the correction for my refund say it wasn't filed?

Either the order already has a correction you issued by hand, or the refund couldn't be matched to invoice lines. The message under the correction says which. Click **Retry** to file it anyway, or use **Issue correction**.

## What's next

- Set up invoice numbering in [Generate invoices](/help/orders/invoices).
- Learn how refunds work in [Issue refunds and handle returns](/help/orders/refunds-and-returns).
- Fix a buyer's details before the invoice is filed in [View and manage orders](/help/orders/manage-orders).