KSeF

KSeF sandbox testing: how to test without touching production

How to test your KSeF integration in the TEST environment, what Notaly's sandbox gives you, and the checks to run before you connect production.

Published 3 min readBy Tomek

Overview

You test KSeF integration in the TEST environment (api-test.ksef.mf.gov.pl), where every submission has no legal or tax effect. Notaly's sandbox sends to KSeF TEST with the platform's test credentials and gives you three free test invoices, so you can validate your FA(3) XML and the whole flow before going near production.

Why test first

KSeF (Krajowy System e-Faktur) is Poland's national e-invoicing platform run by the Ministry of Finance (Ministerstwo Finansów). A production invoice is a legal document, so a mistake is expensive to unwind. The TEST environment exists so you can make those mistakes safely: the API has the same shape and the FA(3) schema is the same, but the result has no tax effect and never reaches a real buyer or the tax office.

What the sandbox gives you

Notaly's sandbox removes the setup cost of a first KSeF test. It authenticates with the platform's own test credentials, so you do not need a production token to start. You get three free test invoices on KSeF TEST; the platform uses a fixed test seller NIP (2745013933) for the documents you submit, so your test data stays isolated from any real taxpayer record.

The checks to run

Work through the flow end to end, because that is where integration bugs surface:

  1. XML validity. Confirm the FA(3) document your code produces validates against the official XSD before it is sent.
  2. Submission. Send an invoice and confirm it reaches the submitted state rather than failing a local validation (a 422 is Notaly's own validation, not a KSeF response).
  3. Acceptance. Check the result: an accepted invoice returns a KSeF number and a UPO (Urzędowe Poświadczenie Odbioru, the official proof of receipt).
  4. Webhooks. Verify your endpoint receives the signed event and that the PDF URL arrives on invoice.accepted.
  5. Errors. Send one deliberately broken document and confirm the error is surfaced in a way you can act on.

TEST vs production

The sandbox is not a preview of your production identity. When you move to production, you connect your own KSeF token in Connect KSeF and your real seller NIP is used on the invoices. The three free sandbox invoices are a training run, not a discount on production volume.

FAQ

Does the KSeF TEST environment have any legal effect? No. Documents submitted to TEST are not real invoices and carry no tax or legal consequences.

How many test invoices can I send in the Notaly sandbox? Three. The sandbox plan includes three free test invoices on KSeF TEST, using the platform's test credentials.

Disclaimer

Notaly is not a tax, accounting or legal advisor. This article is general information, not tax advice, and may be outdated. You are responsible for your own VAT compliance; confirm with a qualified accountant where required.

Sources

Source: www.podatki.gov.pl

Frequently asked questions

Does the KSeF TEST environment have any legal effect?

No. Documents submitted to TEST are not real invoices and carry no tax or legal consequences.

How many test invoices can I send in the Notaly sandbox?

Three. The sandbox plan includes three free test invoices on KSeF TEST, using the platform's test credentials.

What is the difference between the sandbox and production?

The sandbox uses Notaly's platform test credentials against KSeF TEST. Production uses your own KSeF token via Connect KSeF after you upgrade.

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.