Translation. Original: offline/automatyczne-okreslanie-trybu-offline.md
Automatic offline mode determination
04.10.2025
In the case of invoices sent as online (offlineMode: false), the KSeF system may assign them offline mode - based on comparison of the issue date with the processing acceptance date.
Mechanism algorithm
For invoices sent as offlineMode: false, the system compares:
- issue date of the invoice (
issueDate, e.g.,P_1for invoice compliant with FA(3)), - acceptance date of the invoice in the KSeF system for further processing (
invoicingDate).
Rules:
- If the calendar day from
issueDateis earlier than the calendar day frominvoicingDate(comparison by date, not by time), the system automatically marks the invoice as offline, even if it was not declared as such. - If the day of
issueDateand the day ofinvoicingDateare the same, the invoice remains online.
The invoicingDate value depends on the transmission mode:
- batch session -
invoicingDateis the session opening time (equal todateCreatedreturned in session status - GET/sessions/{referenceNumber}), - interactive session -
invoicingDateis the invoice transmission time.
This means that if, for example, an invoice was issued on 2025-10-03 (P_1) and sent on 2025-10-04 at 00:00:01, despite offlineMode: false, it will be marked as an offline invoice.
Examples
Batch session opened at 23:59:59 on October 3rd: Even if the package is sent after midnight, invoices will remain online – because invoicingDate is October 3rd (session opening date).
Interactive session started at 23:59:59 on October 3rd, and invoices were sent after midnight: If P_1 = 2025-10-03, the system will mark them as offline – because the day of P_1 is earlier than the transmission day.