KSeF test invoice: try it before you go live
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)
- Profil Zaufany, e-Dowód, or a qualified certificate to authenticate in KSeF. Profil Zaufany is the simplest; if you don't have one, set it up via online banking
- Your company's NIP (Polish tax identification number). You log in with your real NIP, even in the test environment
- 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.
- Click "Zaloguj się" (Log in).
- Choose your authentication method: Profil Zaufany, e-Dowód, or qualified certificate.
- Enter your company's NIP.
- 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.
- Enter dummy details. Any service name, amount, and date will do.
- Use a fellow business owner's NIP as the buyer's NIP. In step 5 you'll check whether the invoice arrived in their account. If you're testing solo, any valid NIP works (e.g. the Ministry of Finance NIP:
5260250274). - Add one line item: "Test service", 100 PLN net, 23% VAT rate is plenty.
- Confirm the software is pointed at the test environment. Most tools let you switch between production and test in the KSeF integration settings.
- 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. If you used a fellow business owner's NIP in step 2:
- Ask them to log in to the test environment at ap-test.ksef.mf.gov.pl with their own NIP.
- Have them open the inbox.
- Your test invoice should be there, with the KSeF number, amounts, and your 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".
Testing solo and don't have a second NIP? The UPO from step 3 is sufficient proof that KSeF accepted the invoice. You can verify the buyer's receipt separately, for instance with an accountant who handles your client's books.
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:
- Verify the 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 EnvironmentSources
Read next
Receiving invoices in KSeF: nothing to accept
An invoice with your NIP reaches you in KSeF on its own, with nothing to accept. It counts as received on the day KSeF assigns its number.
Invoice for a private individual: KSeF or PDF?
PDF is fine: invoices to private individuals are outside mandatory KSeF, after 2026 too. You can issue one there voluntarily and send it with a QR code.
Cash register invoices and NIP receipts in 2027
Until 31 Dec 2026, cash-register invoices and NIP receipts up to PLN 450 can stay outside KSeF. From 2027 a business buyer's invoice comes from KSeF.