To otwarta lista kodów statusu, które zwraca API Krajowego Systemu e-Faktur (KSeF 2.0). Przy każdym kodzie jest oficjalny opis Ministerstwa Finansów i podpowiedź, co przekazać osobie, która wysyła fakturę. Listę możesz wykorzystać we własnym programie do faktur, na przykład do komunikatów błędów.
codes.jsonicodes.csvzawierają te same 22 wiersze w dwóch formatach.build.pygeneruje oba pliki z jednego źródła:python3 build.py.
| Pole | Co zawiera |
|---|---|
group |
invoice_status to status wysłanej faktury, a authentication_status to status uwierzytelnienia programu w KSeF |
code |
Kod statusu |
description_pl |
Oficjalny opis ze specyfikacji API KSeF |
details_pl |
Oficjalne szczegóły, jeśli specyfikacja je podaje. Kilka wariantów oddzielamy średnikiem |
meaning_en |
Nasze tłumaczenie opisu na angielski. To nie jest tłumaczenie Ministerstwa |
extensions |
Dodatkowe pola w odpowiedzi API, na przykład numer KSeF oryginalnej faktury przy duplikacie (kod 440) |
user_message_pl, user_message_en |
Co przekazać użytkownikowi. Puste tam, gdzie żadne źródło nie podaje, co zrobić |
source |
Miejsce w specyfikacji API, z którego pochodzi opis |
user_message_source |
Źródło podpowiedzi dla użytkownika |
- Opisy i szczegóły pochodzą z pliku
open-api.jsonw repozytorium Ministerstwa Finansów CIRFMF/ksef-docs, commitce3670e. Status faktury jest w schemacieSessionInvoiceStatusResponse, a status uwierzytelnienia wAuthenticationListItem. - Podpowiedzi dla użytkownika pochodzą z poradnika Faktura odrzucona przez KSeF na invoicerate.com. Przy kodach uwierzytelnienia 480 i 550 podpowiedź jest wzięta z oficjalnych szczegółów błędu.
- Przy statusie faktury kod 200 oznacza, że KSeF przyjął fakturę i nadał jej numer KSeF. Kody od 400 w górę oznaczają odrzucenie, więc fakturę trzeba poprawić i wysłać ponownie.
- KSeF rozpoznaje duplikat (kod 440) po NIP sprzedawcy, rodzaju faktury i jej numerze. Ten sam numer nie przejdzie przez 10 lat.
- KSeF nie odrzuci faktury z NIP innej istniejącej firmy jako nabywcy. Taką fakturę poprawia się korektą do zera i nową fakturą dla właściwego nabywcy.
- Te same numery kodów znaczą co innego w różnych grupach. Na przykład 415 przy fakturze to brak możliwości wysłania załącznika, a przy uwierzytelnieniu to brak uprawnień. Sprawdzaj więc kod razem z grupą.
MIT, zobacz LICENSE. Oficjalne opisy pochodzą z repozytorium Ministerstwa Finansów, które też jest na licencji MIT (Copyright (c) 2025 Ministerstwo Finansów).
Listę przygotowało InvoiceRate, bezpłatna aplikacja do faktur KSeF dla JDG. Jeśli specyfikacja API się zmieni, zgłoś issue albo pull request.
This is an open list of the status codes returned by the API of Poland's National e-Invoicing System (KSeF 2.0). Each code comes with the Ministry of Finance's official description and a suggested message for the person sending the invoice. You can use it in your own invoicing software, for example to write error messages.
codes.jsonandcodes.csvhold the same 22 rows in two formats.build.pygenerates both files from one source:python3 build.py.
| Field | What it holds |
|---|---|
group |
invoice_status is the status of a sent invoice, and authentication_status is the status of the software's authentication in KSeF |
code |
The status code |
description_pl |
The official description from the KSeF API specification, in Polish |
details_pl |
The official details, when the specification gives them. Several variants are separated by semicolons |
meaning_en |
Our English translation of the description. It isn't a Ministry translation |
extensions |
Extra fields in the API response, for example the KSeF number of the original invoice for a duplicate (code 440) |
user_message_pl, user_message_en |
The message to show the user. Empty where no source says what to do |
source |
The place in the API specification the description comes from |
user_message_source |
The source of the user message |
- The descriptions and details come from
open-api.jsonin the Ministry of Finance repository CIRFMF/ksef-docs, commitce3670e. Invoice status is in theSessionInvoiceStatusResponseschema, and authentication status is inAuthenticationListItem. - The user messages come from the Polish guide Faktura odrzucona przez KSeF on invoicerate.com. For authentication codes 480 and 550, the message is taken from the official error details.
- For invoice status, code 200 means KSeF accepted the invoice and gave it a KSeF number. Codes from 400 up mean the invoice was rejected, so it has to be corrected and sent again.
- KSeF identifies a duplicate (code 440) by the seller's NIP, the invoice type, and the invoice number. The same number is refused for 10 years.
- KSeF won't reject an invoice that names another existing company's NIP as the buyer. You correct that invoice with a correction to zero and a new invoice for the right buyer.
- The same code number means different things in different groups. For example, 415 on an invoice means attachments can't be sent, and 415 on authentication means no permissions are assigned. Always read the code together with its group.
MIT, see LICENSE. The official descriptions come from the Ministry of Finance repository, which is also MIT licensed (Copyright (c) 2025 Ministerstwo Finansów).
The list is maintained by InvoiceRate, a free KSeF invoicing app for sole traders in Poland. If the API specification changes, open an issue or a pull request.