Integration guide

From payment to your first KSeF Demo invoice

What happens after you pay for Notaly: connect a KSeF Demo token, send a test invoice with your API key, check the result, then move to production.

Updated

Overview

After you pay, you first validate your setup on KSeF Demo and only then move to production. You connect a Demo token in the dashboard, send one test invoice yourself through the API with your own API key, and we check the result with you.

If we cannot enable production within 5 business days after you provide your NIP and a valid KSeF production token, your setup has been validated on KSeF Demo and you complete the onboarding steps, you get a full refund (see Terms).

What happens in the first 24 hours?

Within 24 hours of payment we email you and ask for two things: your NIP, and answers to three short questions. Do you issue the invoice on the same day you deliver the goods or service? Do you invoice only in PLN? Does every invoice line carry a unit of measure? We never ask for your KSeF token. You enter it yourself in the dashboard.

Step 1: generate a KSeF Demo token

Log in to the Demo taxpayer application at ap-demo.ksef.mf.gov.pl as your company and generate a token with the InvoiceWrite and InvoiceRead permissions. Demo needs real credentials (your real NIP and an authorised login), but nothing issued there has legal effect. Demo tokens work only in Demo. Production will need a separate token. Our KSeF token guide walks through it step by step.

Step 2: connect it with "Validate on KSeF DEMO first"

In the Notaly dashboard, open Settings and use Validate on KSeF DEMO first. Notaly authenticates against KSeF Demo with your token. The connection becomes active only if KSeF accepts it. One account = one seller NIP: a new connection replaces the previous one.

Step 3: send a test invoice with your API key

You send the test invoice yourself, from your own system or with curl. The seller NIP must be the NIP you connected. Any other NIP returns 422 seller_nip_not_authorized before anything reaches KSeF.

curl -X POST https://api.getnotaly.com/invoices \
  -H "Authorization: Bearer $NOTALY_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: demo-FV-2026-10-001" \
  -d '{"number":"FV/2026/10/001","issueDate":"<TODAY, YYYY-MM-DD>","currency":"PLN",
       "seller":{"nip":"<YOUR_NIP>","name":"Your company","address":{"line1":"ul. Przykładowa 1, 00-001 Warszawa","country":"PL"}},
       "buyer":{"nip":"<BUYER_NIP>","name":"Test Customer","address":{"line1":"ul. Próbna 2, 30-001 Kraków","country":"PL"}},
       "items":[{"name":"Consulting","unit":"h","quantity":2,"unitNetPrice":200,"vatRate":23}]}'

Use a buyer NIP you are entitled to use: on KSeF Demo the invoice is visible to that NIP.

Today the API accepts only currency: "PLN" (other codes get 422 currency_not_supported) and the VAT rates 23, 8, 5 and 0 (domestic 0%, written as "0 KR"; export and intra-EU 0% are not supported). A unit is required on every line.

Step 4: check the result

Call GET /invoices/:id until the status is accepted or rejected, or receive it by webhook. An accepted invoice has a KSeF number and a PDF with a KSeF QR code that points to the Demo verification site. Notaly requests the UPO and adds it to the invoice when KSeF issues it. We look at the same result with you. If it is rejected, the stable ksef_rejected:<code> tells us what to fix.

Step 5: production

Once the Demo invoice is accepted, generate a separate production token at ap.ksef.mf.gov.pl for the same NIP and connect it in Settings with Switch to KSeF PRODUCTION (paid plans only). Real invoices start once KSeF accepts that production token. From then on every invoice accepted by KSeF is a legally effective tax document issued under that token's NIP: it cannot be deleted or withdrawn, and errors are fixed with a correcting invoice (faktura korygująca).

Notaly validates and submits invoices. It is not a tax, accounting or legal advisor, and VAT rates and tax classification remain your responsibility.

Summary

  • Pay → we email you within 24 h (NIP + 3 questions, never the token).
  • Demo token → "Validate on KSeF DEMO first" → test invoice sent by you via the API.
  • Accepted on Demo → your production token (paid plans) → first real invoice.
  • Full refund if production isn't enabled within 5 business days of a valid NIP + production token and a validated Demo setup (see Terms).

Sources

Source: www.podatki.gov.pl

Frequently asked questions

Do I send my KSeF token to Notaly by email?

No. Treat the token like a password. You type it yourself in the Notaly dashboard under Settings. We never ask for it by email, chat or phone.

Does the Demo invoice have legal effect?

No. KSeF Demo uses real company credentials but invoices issued there have no legal effect. Real invoices are issued only after your production connection is active.

How long does activation take?

KSeF production is live on paid plans. Once your test invoice is accepted on KSeF Demo, connect your production token in Settings: production works as soon as KSeF accepts that token. If we do not enable production within 5 business days after you provide a valid NIP and a valid KSeF production token, your setup has been validated on KSeF Demo and you have completed the onboarding steps, you get a full refund (see Terms).

Issue your first KSeF test invoice today

Create a sandbox account: API key in seconds, 3 free test invoices on KSeF TEST, no credit card.