Saltar al contenido principal

Poland KSeF mandatory B2B e-invoicing — get ready

Poland's KSeF (Krajowy System e-Faktur) is the national e-invoicing platform operated by the Ministry of Finance (mf.gov.pl). It centralizes all B2B invoice exchange: invoices are submitted to KSeF, which assigns an official identifier (KSeF number) and makes the invoice available to the recipient. KSeF is already operational as a voluntary system. Mandatory enrollment follows in phases starting February 2026.

Mandatory dates

Taxpayer categoryMandatory from
Large taxpayers (VAT revenue > PLN 200M/year)1 February 2026
SMEs1 April 2026
Micro-enterprises (turnover < PLN 9M/year)1 January 2027
Foreign entities with Polish VAT registrationSubject to separate regulation (TBC)

These dates were confirmed by the Ministry of Finance in 2025 after an earlier postponement from July 2024. If you invoice Polish businesses or operate a Polish VAT-registered entity, you need a KSeF-ready workflow before these deadlines.

What KSeF changes operationally

Under KSeF:

  1. You submit structured XML (FA_VAT format) to the KSeF API.
  2. KSeF assigns an official KSeF number (KSEFNR) to the invoice.
  3. The invoice is legally valid from the moment KSeF assigns the number.
  4. Your buyer retrieves the invoice from KSeF using the KSEFNR — email attachments no longer serve as the primary invoice delivery mechanism.
  5. 30-day payment deadline is calculated from the KSeF assignment date, not from the invoice date.

This is a significant operational shift: an invoice that fails KSeF submission (due to schema errors, authentication failure, or API downtime) is not legally issued until KSeF accepts it. Frihet validates locally before submission to minimize rejections.

FA_VAT(3) schema

The current KSeF invoice format is FA_VAT version 3, published in the official Polish Government Legislation Journal:

  • Namespace: http://crd.gov.pl/wzor/2025/06/25/13775/
  • Schema file: FA_VAT(3).xsd — available from the Ministry of Finance developer portal
  • Effective: aligned with the 2026 mandatory rollout

FA_VAT(3) introduces changes from FA_VAT(2):

ElementChange in v3
Seller identificationExtended taxpayer type codes
VAT rate enumerationAdded new zero-rate reason codes
Pre-paid invoicesNew field ZaliczkaCzesciowa
KSeF referenceMandatory field for corrective invoices
Annotation fieldStructured annotation codes replace free text

Frihet generates FA_VAT(3) XML directly from your invoice data. You do not need to manage the schema manually.

XAdES authentication — how KSeF works

KSeF uses a challenge-response authentication flow before accepting invoice submissions. The flow is asynchronous:

  1. Request a challenge token — your system calls POST /api/online/Session/AuthorisationChallenge with your NIP (Polish VAT number).
  2. Sign the challenge — KSeF returns a challenge string. You sign it with XAdES using your qualified electronic signature certificate.
  3. Initialize session — send the signed challenge to POST /api/online/Session/Authorise. KSeF returns a session token valid for a limited window.
  4. Submit invoices — use the session token in the SessionToken header for each POST /api/online/Invoice/Send call.
  5. Retrieve KSeF number — poll GET /api/online/Invoice/Send/{referenceNumber} until processingCode: 200 and extract the ksefReferenceNumber.

Frihet automates this entire flow in its Cloud Functions submitKsef and getKsefStatus. The session token is cached for the valid window to minimize authentication round-trips.

Authentication certificate requirements

The certificate used to sign the KSeF challenge must be a qualified electronic signature issued by a Polish Trusted List (PTL) authority. Accepted issuers include:

  • Certum (Asseco Data Systems)
  • EuroCert
  • KIR (Krajowa Izba Rozliczeniowa)
  • PWPW (Polska Wytwórnia Papierów Wartościowych)

Certificates issued outside Poland's Trusted List are not accepted by KSeF, even if they are eIDAS-qualified certificates from other EU states. If you operate a Polish entity, you need a Polish qualified certificate.

Sandbox testing

KSeF provides a test environment at:

https://ksef-test.mf.gov.pl

The sandbox accepts the same API schema as production but does not create legally binding invoices. Frihet's submitKsef Cloud Function points to the sandbox URL when the workspace KSeF configuration is in test mode.

To test in sandbox:

  1. Go to Settings → Integrations → KSeF.
  2. Enter your NIP and upload your qualified certificate (.p12 format).
  3. Enable Sandbox mode.
  4. Issue a test invoice to a Polish company. Frihet submits it to ksef-test.mf.gov.pl and returns the test KSEFNR.

The sandbox environment accepts test NIP numbers. If you do not yet have a Polish qualified certificate, contact KSeF support at the Ministry of Finance to obtain test credentials.

Corrective invoices

Under KSeF, a corrective invoice (Polish: faktura korygująca) must reference the KSEFNR of the original invoice. Frihet automatically populates the KSeF reference field in the corrective invoice XML when you create a credit note against a KSeF-submitted invoice.

If you need to correct an invoice submitted before KSeF was mandatory (no KSEFNR), Frihet includes the original invoice number in the NrFaKorygowanej field instead.

Generating a KSeF invoice in Frihet

  1. Set the client's country to Poland and enter their NIP (Polish VAT number) in the client record.
  2. Create the invoice as usual.
  3. In the invoice export dialog, select KSeF FA_VAT(3) as the format.
  4. Click Submit to KSeF to initiate the authenticated submission flow.
  5. Frihet returns the KSeF reference number (KSEFNR) once KSeF accepts the invoice.
  6. The KSEFNR is stored in the invoice record and printed on the PDF invoice for your buyer's reference.

If KSeF is unavailable (planned maintenance or outage), Polish regulations include a fallback mode: invoices may be issued offline and submitted retrospectively within a defined window. Frihet manages the offline queue and submits automatically when KSeF recovers.

VAT rates in Poland

Polish VAT rates as of 2025:

RateCategory
23%Standard rate
8%Reduced (food, medical equipment, construction)
5%Super-reduced (basic food, books, periodicals)
0%Exports, intra-EU supplies
ZWVAT-exempt

Frihet applies the correct rate based on your product configuration and the invoice recipient's status. B2G invoices to Polish public authorities typically use the same rates as B2B; the difference is in the buyer identification fields within FA_VAT(3).

Impact on payment terms

A critical operational change under KSeF: the statutory 30-day payment period for commercial transactions is measured from the KSeF assignment date, not from the invoice date or delivery date. This aligns with Polish commercial law (Ustawa o terminach zapłaty w transakcjach handlowych).

Frihet sets the due date on KSeF invoices based on the KSeF assignment timestamp received from the API, not the invoice creation date. Check your payment terms configuration if you rely on specific due date calculations.

What about B2G in Poland?

Poland's B2G e-invoicing (invoices to the public sector) uses a separate platform: PEF (Platforma Elektronicznego Fakturowania), operated by PEPPOL. This is independent of KSeF and has been mandatory for central government procurement since April 2019. Frihet generates PEPPOL BIS 3.0 UBL for Polish B2G invoices. KSeF and PEF are parallel systems; some invoices may need to be submitted to both.

Frequently asked questions

Is KSeF mandatory for foreign companies with Polish VAT registration? The Ministry of Finance has indicated that foreign entities with Polish VAT registration will be subject to separate regulation. The current mandatory dates apply primarily to Polish-resident taxpayers. Monitor podatki.gov.pl for updates on foreign entity obligations.

What happens if KSeF is down when I need to invoice? Polish regulations include an offline fallback: you can issue an invoice locally and submit it to KSeF within a grace period (expected 1 business day, subject to final regulation text). Frihet queues unsubmitted invoices and submits them automatically when KSeF becomes available.

Can I still send PDF invoices to Polish customers after the mandate? The KSeF number (KSEFNR) must appear on any PDF or printed copy. The structured XML in KSeF is the primary legal document. You may include a PDF as a courtesy copy, but the KSEFNR must be printed on it.

Does KSeF apply to B2C (consumer) invoices? No. KSeF is a B2B and B2G system. Consumer invoices (paragon fiskalny) remain outside KSeF scope and are regulated separately through fiscal printers.

What is the penalty for non-compliance? The penalty regime is still being finalized in implementing regulations. Initial proposals specify fines up to 100% of the VAT amount on non-compliant invoices, capped at certain thresholds. Monitor the Ministry of Finance guidance at podatki.gov.pl.

Official references