Frequently Asked Questions
General
Does the EFR response differentiate between Offline24 mode and officially announced KSeF outages?
The current implementation is with a generic offline mode. It does not specify or differentiate between the different offline modes at the moment.
What happens when the EFR can’t connect to KSeF and what data is the EFR returning to our POS in this case?
On KSeF timeout/unreachable, the EFR:
- switches to generic offline mode,
- fiscalizes locally,
- prints/returns two QR codes,
- and the EFR queues the invoice for later submission.
Returned to POS:
- With printer:
- success + offline behaviour, no QR payloads in TraC.
- With
DO="noprint":- success + two QR tags (KSeF_Offline_QR1/QR2) containing all QR payload data.
Why does an invoice not immediately appear in KSeF?
This can happen when:
- Cloud (and KSeF) communication timed out
- the invoice was inserted into the retry queue
In such cases the system will retry automatically, and the invoice should appear in KSeF later.
Why is the XML sometimes generated in the cloud?
In most cases, the EFR generates the XML.
However, if an invoice contains negative line items (for example refunds or corrections), the XML must be generated in the cloud, because the referenced invoice data (such as the original KSeF number) is only available there.
Is it possible to provide an E-Invoice through the EFR when the customer is a foreigner without a NIP?
Yes, the customer defined in ESR.Ctm can also have a EU-VAT or NON-EU-VAT number. However, efsta’s current EFR KSeF integration assumes B2B, which requires a Tax ID. Therefore, the field Ctm.TaxId must be provided.
Certificates
What certificates are required for KSeF?
Two types of certificates are required, both of which must be uploaded through the efsta portal:
-
Authentication certificate (Type 1)
Used by the efsta cloud to authenticate with KSeF for sending invoices. -
Offline QR certificate (Type 2)
Used when issuing invoices in offline mode. This certificate allows verification of invoices issued outside of KSeF.
Can I use the same certificates in the test, demo, and production environments?
No. Certificates are environment-specific and cannot be reused across environments. So if a certificate is issued in the KSeF Demo portal, it can only be used for transactions with DD="PL-DEMO". The same applies to the test and production environments.
KSeF provides separate taxpayer portals for each environment:
| Environment | Portal link |
|---|---|
| Test | https://ap-test.ksef.mf.gov.pl/web/ |
| Demo | https://ap-demo.ksef.mf.gov.pl/web/ |
| Production | https://ap.ksef.mf.gov.pl/web/ |
QR codes
Does the EFR generate the data needed for the QR codes locally or in the efsta cloud?
The EFR generates the data both locally and in the efsta cloud, depending on the mode and invoice type.
Online mode
In online mode:
- the QR code link is "generated" by the cloud because the KSeF number, which is a required part of the QR code, is obtained from the status request of the sent KSeF invoice
- The invoice hash, which is also required for the QR code, can be generated either locally or in the cloud.
- If the invoice contains only positive positions, the XML and the corresponding hash are generated locally.
- Otherwise if the invoice contains negative positions (f.e: refund), the XML and the hash are generated in the cloud.
- That QR code link value is either:
- sent to the fiscal printer, or
- returned in
TraC.Fis.Tagas KSeF_Online_QR whenDO="noprint".
Offline mode
In offline mode,
- EFR generates:
- the invoice XML hash and
- the certificate/issuer data,
- and returns them as KSeF_Offline_QR1 and KSeF_Offline_QR2 or sends them to the printer.
- Refunds, Voids, and similar, are not possible in the Offline Mode, so in this case no QR code gets generated and the transaction is rejected by the EFR.
Does the EFR return the QR codes that are in some cases (Offline) mandatory to be printed on the visual invoice representation?
Yes, it does.
Are the QR codes returned ready to print or do we have to generate the QR code with the provided return data?
KSeF doesn’t return the graphical QR codes, just the data like the ksefNumber which is a required part of the QR code link.
Why are two QR codes printed on the receipt?
Two QR codes are printed when the EFR operates in offline mode.
The QR codes contain:
- the invoice XML hash (to identify the invoice)
- the offline certificate (to verify the issuer)
These allow the tax authority and the buyer to verify the invoice even when KSeF was temporarily unavailable at the time of issuance.