ksefujto

Issuing and receiving invoices

KSeF test invoice: try it before you go live

6 min readWritten by AI

You will send a test invoice to the KSeF (Krajowy System e-Faktur, Poland's National e-Invoicing System) test environment and collect the UPO, the system's proof of receipt. Then you will confirm the invoice shows up in the buyer's KSeF account.

The test environment is a sandbox run by the Ministry of Finance. Invoices with made-up amounts and buyer details have no legal standing there and never reach the tax office.

Before you start

You need:

  • Invoicing software with KSeF 2.0 integration, or the free Aplikacja Podatnika from the Ministry of Finance (browser-based, no installation needed)
  • Two made-up NIPs (Polish tax identification numbers), one for the seller and one for the buyer. The Ministry of Finance asks for random NIPs in the test environment, never real company data. You don't need Profil Zaufany or a certificate for the test; they only come in with your first real invoice
  • 15 minutes

Step 1: Log in to the KSeF test environment

Go to ap-test.ksef.mf.gov.pl, the official KSeF 2.0 test environment.

  1. Click "Zaloguj się" (Log in).
  2. Choose „Zaloguj uwierzytelnieniem testowym” (log in with test authentication). Profil Zaufany doesn't work in the test environment.
  3. Enter the made-up seller NIP as the context, and enter it again as your identifier.
  4. Once logged in, you'll see a panel with two tabs: outbox (invoices you've sent) and inbox (invoices sent to you).

On a first login both tabs are empty.

Check that the address says ap-test.ksef.mf.gov.pl and not the production app. Invoices submitted to production have real legal consequences.


Step 2: Issue a test invoice

Open your invoicing software (or the Aplikacja Podatnika) and create a new invoice. It doesn't need to be real.

  1. Enter dummy details. Any service name, amount, and date will do.
  2. Enter the second made-up NIP as the buyer's NIP. Note it down: in step 5 you'll log in with it to check that the invoice arrived.
  3. Add one line item: "Test service", 100 PLN net, 23% VAT rate is plenty.
  4. Confirm the software is pointed at the test environment. Most tools let you switch between production and test in the KSeF integration settings.
  5. Click "Send to KSeF" (or the equivalent in your software).

The software generates the XML file and submits it to the test environment. You don't need to touch the file.

In the MF Aplikacja Podatnika, you create the invoice directly in the form, under "Wystaw fakturę" (Issue invoice) after logging in. No external software needed.


Step 3: Collect the UPO

After submission, KSeF returns a UPO (Urzędowe Poświadczenie Odbioru, Official Proof of Receipt), the system's formal acknowledgement that your invoice was accepted. Without it you have no confirmation. An error message instead means the invoice was rejected; see "What to do if submission fails" below.

The UPO contains:

  • KSeF number, your invoice's unique identifier in the system
  • Date and time of acceptance, from which the invoice formally exists in KSeF
  • File hash and system digital signature, proof the document hasn't been altered in transit

In your software the UPO typically appears alongside the invoice as a "Sent" or "Accepted by KSeF" status, with an option to download the details.

KSeF 2.0 Manual Part II — Issuing and Receiving Invoices (MF)

Step 4: Check the KSeF number

Every accepted invoice receives a 35-character KSeF number, a string of digits and letters separate from your own invoice number (e.g. FV/001/04/2026). Your invoice number is your internal reference; both are required, but they serve different purposes.

Check that it's visible:

  • In your software: next to or below the document number.
  • On the printout / PDF: if you generate a visual invoice, the KSeF number should appear on it, labelled "Numer KSeF" or "Numer identyfikujący fakturę w KSeF".

Step 5: Verify receipt on the buyer's side

This shows you what the invoice looks like from your client's perspective. Now you play the buyer:

  1. Log out and log back in at ap-test.ksef.mf.gov.pl with test authentication, this time with the buyer NIP from step 2.
  2. Open the inbox.
  3. Your test invoice should be there, with the KSeF number, amounts, and the seller NIP as the issuer.

The buyer doesn't receive anything by email or any other channel. KSeF delivers the invoice directly to the account linked to their NIP, so there is no more "I never received your invoice email".

If the invoice isn't there but you got a UPO in step 3, you still have proof that KSeF accepted it.


What to do if submission fails

The three most common causes:

1. Authentication error or expired session

KSeF sessions expire after a set time. If your software shows an authentication error:

  • Refresh the KSeF connection in your software settings.
  • Log in again.
  • Retry the submission.

2. Invalid buyer NIP

KSeF validates NIP format. If you entered a string of digits that isn't a valid NIP:

  • In TEST: a NIP is 10 digits with no dashes or spaces, and the first digit can't be zero. TEST doesn't check the checksum.
  • In production: verify the buyer's NIP at biznes.gov.pl.
  • Correct the NIP on the invoice and resubmit.

3. Malformed XML file

This is rare with decent software, since your tool should generate valid XML automatically. But if you see a raw error message:

  • Paste the file into ksefuj.to to get a description of every problem in plain language. Your data never leaves your browser.
  • Fix the flagged issues in your software and resubmit.

Next step: your first real invoice

Switch your software to the production KSeF environment, check the buyer's NIP, name, and address, submit, and check the UPO as you did here. Everything else works identically. Without invoicing software you can issue it for free in the Taxpayer App: your first real invoice step by step. For the wider picture, read KSeF for Sole Traders and the KSeF FAQ on operating modes, exemptions, and deadlines.

FAQ MF — KSeF 2.0 KSeF 2.0 Test Environment

Was this article helpful?

Don’t miss KSeF changes

We’ll send a short email when KSeF rules or deadlines change. We only write then, so you won’t hear from us often.

You can unsubscribe at any time. Powered by Buttondown

  • Invoices7 min read

    VAT RR invoices in KSeF need the farmer's consent

    The buyer issues the VAT RR invoice. Since 1 April 2026 it does so in KSeF if the farmer names it there in a statement. Otherwise, outside KSeF.

  • Invoices7 min read

    KSeF keeps your invoices for 10 years

    KSeF stores invoices for 10 years from the end of the year of issue, so you don't keep them yourself. Invoices outside KSeF you store as before.

  • Invoices7 min read

    Your KSeF invoice can be in English

    Your client can get an English or bilingual invoice. The invoice itself is the FA(3) XML in KSeF: Polish field names, and the translation must match it.

More on this topic: Issuing and receiving invoices