Fakturownia is a Polish online invoicing service. Connect it to your store and every paid order gets a VAT invoice in your Fakturownia account within seconds, with no copying of order details by hand. Turn on one more option and Fakturownia also emails that invoice to the buyer.

## What the add-on does

For every paid order, your store creates an invoice in Fakturownia with:

- **Your store as the seller** – the company name, NIP and address from your [store details](/help/account/general-settings)
- **The buyer** from the order's billing address, or the shipping address when the buyer gave no billing address, plus their NIP when they entered one at checkout
- **Each item** at the price the buyer actually paid after discounts, with its tax rate and SKU, and **shipping** as its own line
- **Paid status** and the order number (for example `#48`) in the invoice description, so you can find the invoice from the order and the other way round

Each order's **Activity** shows **Invoice created** once Fakturownia has accepted it.

## Before you start

- **A Fakturownia account.** Any plan works, including Start.
- **Your company details in YNS.** Fakturownia prints the seller from what your store sends, so fill in the company name, NIP and address under [Edit your store details](/help/account/general-settings) first.

## Connect your store

1. In Fakturownia, open **Ustawienia → Ustawienia konta → Integracja** and copy the **Kod autoryzacyjny API** (API token).
2. In YNS, open **Add-ons** and choose **Fakturownia**.
3. In **Your URL**, enter your Fakturownia address, for example `https://yourcompany.fakturownia.pl/`.
4. Paste the token into **API KEY** and click **Save**.

Your next paid order gets an invoice. Orders paid before you connected the add-on don't – issue those in Fakturownia.

## Email the invoice to the buyer

Instead of printing the invoice and packing it with the order, let Fakturownia email it:

1. Open **Add-ons → Fakturownia**.
2. Tick **Email the invoice to the buyer** and click **Save**.

From then on, as soon as Fakturownia creates an order's invoice, it emails it to the email address the buyer used at checkout, with the invoice PDF attached. The order's **Activity** shows **Invoice emailed to the buyer**.

Good to know:

- **The email comes from Fakturownia, not from your store.** On plans without your own sending address it arrives from `noreply@fakturownia.pl`. Set the sender name, the reply-to address and the email text in your Fakturownia account settings, so buyers who reply reach you.
- **Only new orders.** Turning the option on doesn't send invoices for earlier orders. Send those from Fakturownia if you need to.
- **It never holds up the order.** If the email can't go out – the order has no email address, or Fakturownia refuses the send – the invoice still exists. The order's **Activity** shows **Invoice email to the buyer failed** with the reason, and the same entry appears on the [Issues](/help/orders/store-issues) page. Send that invoice from Fakturownia by hand.

You can also ask Elliot to turn invoice emails on or off for you.

## Troubleshooting

### An order shows "Invoice generation failed"

Fakturownia refused the invoice, and the entry on the order (and on [Issues](/help/orders/store-issues)) says why. The most common reasons:

| What the message says | What to do |
|---|---|
| **401** or **Token API został unieważniony** | Fakturownia switched off your API token, for example after a security check. Copy a new token from **Ustawienia → Ustawienia konta → Integracja**, paste it into **Add-ons → Fakturownia** and click **Save**. |
| **404** or an address error | **Your URL** doesn't match your Fakturownia address. Copy it from your browser's address bar while logged in to Fakturownia. |
| A field such as the NIP or the seller name | Your store details are incomplete – see [Edit your store details](/help/account/general-settings). |

Invoices aren't retried automatically. After you fix the cause, issue the invoices for the orders that failed in Fakturownia.

## FAQ

### Can I change the invoice layout or numbering?

Yes, in Fakturownia. Your store leaves the number empty, so Fakturownia numbers each invoice with your own numbering pattern and prints it with your chosen template.