Who this is for: organization administrators and team members who need to connect KSeF, configure a workflow, and understand exactly where an invoice is sent.
The simple idea: KSeF is a government mailbox for electronic invoices. Colba prepares the message, the backend sends it to KSeF, and the UI displays the official response.

1. What you need
- organization administrator access in Colba;
- the seller NIP — exactly 10 digits;
- access to the correct MF taxpayer portal;
- a KSeF token for the selected environment;
- seller, buyer, and invoice-line data.
Never put the token into a pipeline, HTML, Telegram, process name, or ordinary document field. The token is stored only in protected organization secrets.
2. KSeF environments
| Environment | Purpose | Important rule |
|---|---|---|
TEST | Technical testing | Safe learning and trial invoices |
DEMO | Pre-production validation | Check the scenario before a real submission |
PRD | Real KSeF | The invoice becomes a real government document |
Each environment has its own portal, token, and public-key set. A TEST token is not a production token.

3. Connect the organization
- Open Organization Settings → Integrations → KSeF.
- Choose an environment. Use
TESTwhen learning. - Check the NIP. Wstaw z profilu fills it from the organization profile.
- Open the token-generation link for the same environment.
- Generate a token in the MF portal and copy it in full.
- Paste it into Token KSeF.
- Click Zapisz konfigurację.
Colba removes spaces and dashes from the NIP, while the backend also validates its checksum. During save, the backend automatically fetches MF public encryption keys.

4. Understand the connection state
- Nieskonfigurowany — the integration is not configured.
- Skonfigurowany — wymaga testu — data is saved, but the connection is not confirmed.
- Aktywny (TEST), Aktywny (DEMO), or Aktywny (PRD) — the latest test succeeded for that environment.
Click Przetestuj połączenie. If you changed the environment or token, save first: the test button stays disabled until the change is saved.

5. Prevent accidental PRD submissions
When you choose PRD, a red confirmation appears. Check it only after verifying that the token is the real MF production token.
Before the first real submission, check:
PRDis selected;- the card says Aktywny (PRD);
- the token came from the production portal;
- the workflow has no conflicting environment;
- you are ready to create a real government invoice.
The organization environment is the source of truth. If a workflow requests another environment, such as TEST while the organization is configured for PRD, submission is blocked. Submission is also blocked when the organization has no explicit KSeF environment.

6. Add KSeF to a workflow
- Open the pipeline editor.
- Add the Invoice in KSeF action.
- Pass invoice business data through inputs or payload mapping.
- Save the pipeline.
You can pass the invoice number, date, seller, buyer, line items, quantities, prices, VAT, currency, source-invoice ID, and idempotency key.
Do not put a token, private key, or MF key into the pipeline. The workflow automatically uses the organization secrets.

7. What happens after launch
- input data is validated;
- the active organization is located;
- the environment is read from organization settings;
- FA(3) XML is built;
- Colba authenticates with KSeF;
- the payload is encrypted and submitted;
- the number, status, and confirmations are saved.
The browser does not send the token or invoice directly to KSeF. The backend does.
8. Read the invoice status
- Wysłana do KSeF — the invoice was sent and is being processed.
- Przyjęta przez KSeF (ACCEPTED) — the invoice was officially accepted.
- Wykryto duplikat KSeF — a duplicate was found.
- Odrzucona przez KSeF — the invoice was rejected or an error occurred.
The process banner shows Cel: TEST, Cel: DEMO, or Cel: PRD.

9. Find the KSeF number and UPO
The process and document details show:
- the official KSeF number;
- the internal invoice number;
- the session reference;
- the UPO or entry reference;
- the environment;
- the creation date;
- the Weryfikuj w MF button.
If UPO has not arrived yet, the UI says Oczekiwanie na UPO. This is an intermediate state, not necessarily an error.
10. Document list, PDF, and QR
The document list shows KSeF ✓ · PRD. Document details show the green KSeF Zarejestrowano (FA(3)) panel. The PDF includes the KSeF number, UPO, environment, and a verification QR code.
The QR code only points to a verified MF domain. If the URL fails the HTTPS and domain checks, the button and QR code are not shown.

11. Switch environments
- select
PRD; - paste the production token;
- save the configuration;
- confirm the production warning;
- run the connection test;
- verify Aktywny (PRD).
Old invoices are not moved to a new environment. A TEST invoice remains TEST even after the organization switches to PRD. Queued invoices use the environment saved on that specific invoice.
12. Common problems
| Symptom | What to check |
|---|---|
| Invalid NIP | 10 digits and a valid checksum |
| Missing token | The token was generated in the same environment selected in Colba |
| Test button disabled | Save the changed environment or token first |
| Environment mismatch | Remove the conflicting workflow value or change the organization setting |
| No KSeF number | The invoice is still processing or was rejected |
| No UPO | Wait for the official confirmation |
| No verification button | The URL failed the security check or the number is not ready |
13. Production checklist
- the environment is
PRD; - the card says Aktywny (PRD);
- a production token is used;
- the NIP is verified;
- the workflow contains no other environment;
- the process shows Cel: PRD;
- the KSeF number and UPO are available;
- the verification link points to MF;
- the PDF says
Environment: PRD.
If any item is missing, stop the submission and check the configuration first.