As of April 1, 2026, Poland's Krajowy System e-Faktur (KSeF) is mandatory for all businesses. Large enterprises (revenue above PLN 200M) have been live since February 1, 2026, and now every remaining VAT-registered entity must issue structured invoices through KSeF. But the impact extends far beyond invoice issuance — it fundamentally changes how VAT returns are filed.
Based on Avalara research published in January 2026, the JPK_VDEK (Poland's SAF-T VAT return) schema has been updated with new mandatory invoice reference fields. This article explains what's changing, why it matters, and what you need to do — urgently.
What's Changing in JPK_VDEK
The JPK_VDEK (Jednolity Plik Kontrolny — Ewidencja VAT i Deklaracja) is Poland's unified SAF-T file that combines VAT records and the VAT declaration into a single submission. With KSeF now mandatory, the Polish tax authority (Krajowa Administracja Skarbowa) has updated the JPK_VDEK schema to require a direct link between every invoice and its KSeF registration.
JPK_VDEK
Schema Updated
New mandatory fields added to the JPK_VDEK schema requiring KSeF identification numbers or reference codes for every invoice line.
KSeF ID
Now Mandatory
Every invoice in the VAT return must include either a KSeF identification number or one of three approved reference codes.
Rejected
No Grace Period
VAT returns missing these fields will be rejected by the tax authority system. There is no known grace period for non-compliance.
This is a critical change because it creates a hard dependency between KSeF compliance and VAT return filing. Previously, even if a business was slow to adopt KSeF, it could still file VAT returns. Now, without proper KSeF references, the VAT return itself will fail validation.
The KSeF Identification Number Requirement
When an invoice is successfully submitted to KSeF, the system assigns a unique KSeF identification number. This number serves as proof that the invoice was registered in the national system and is the primary reference that must appear in the JPK_VDEK return.
The flow is straightforward for invoices processed through KSeF: the invoice is created in FA(3) XML format, submitted to ksef.mf.gov.pl, a KSeF ID is assigned, and that ID is then included in the corresponding JPK_VDEK filing. The challenge arises when invoices fall outside the standard KSeF flow.
Why This Matters for Buyers Too
The KSeF ID requirement isn't just a seller-side concern. Buyers must also include the KSeF ID of purchase invoices in their JPK_VDEK filings. If your supplier doesn't provide a KSeF ID, your own VAT return may be affected. This creates a supply-chain compliance dependency that makes KSeF adoption critical for all parties.
Reference Codes: OFF, BFK, and DI
Not every invoice will have a KSeF identification number. The Polish tax authority recognises three legitimate scenarios where a different reference code must be used instead. Each code signals to the tax authority why a KSeF ID is absent — and each has specific conditions for valid use.
KSeF Identification Number
The unique identifier assigned by KSeF when the invoice is successfully registered. This is the primary reference that must appear in the JPK_VDEK return for every standard invoice.
Offline Mode Reference
Used when the invoice was issued during a period of KSeF unavailability. The taxpayer must prove that KSeF was down at the time of issuance. The invoice must be submitted to KSeF retroactively once the system is restored.
Cash Register Receipt Reference
Applies to invoices issued based on a cash register receipt (paragon fiskalny). These receipts have their own fiscal identification and are not transmitted through KSeF but must still be referenced in the JPK_VDEK return.
Non-KSeF Document Reference
Used for documents that are legitimately outside KSeF scope, such as certain corrective notes, simplified invoices under PLN 450, or invoices from non-Polish entities. Each use must be justified.
It's critical to understand that these reference codes are not optional alternatives to using KSeF. They are exception codes for specific, justified scenarios. A business that routinely uses "DI" or "OFF" codes without legitimate justification will attract scrutiny from the tax authority. The expectation is that the vast majority of invoices will carry a proper KSeF identification number.
Consequences of Missing Fields
The consequences of submitting a JPK_VDEK without the required KSeF references are severe and immediate:
The JPK_VDEK file will fail schema validation and be rejected by the tax authority system. The return is treated as not filed until corrected and resubmitted.
A rejected VAT return that is not corrected and resubmitted before the filing deadline counts as a late filing. Late filing penalties under the Polish Tax Ordinance can reach up to PLN 56,000.
If purchase invoice KSeF references are missing, the tax authority may challenge input VAT deductions. This risk cascades through the supply chain.
Repeated rejections or corrections flag the business for increased audit scrutiny. The tax authority uses automated risk scoring that factors in filing quality.
No Known Grace Period
Unlike some EU e-invoicing mandates that include transitional tolerance periods, the Polish tax authority has not announced any grace period for missing KSeF references in JPK_VDEK filings. The schema validation is binary: either the fields are present and valid, or the return is rejected. Businesses should operate under the assumption that enforcement is immediate.
SAP-Specific Challenges
SAP is the dominant ERP in Poland's enterprise segment, and it presents unique challenges for KSeF-JPK_VDEK compliance. The core issue: KSeF-related fields are NOT standard SAP fields.
Custom BAdI Implementation
SAP does not natively store KSeF identification numbers. Custom Business Add-Ins (BAdIs) are required to extract, store, and retrieve KSeF IDs alongside invoice data. This requires ABAP development expertise.
Custom Table Extensions
New custom tables (Z-tables) or field extensions to standard invoice tables are needed to persist KSeF IDs and reference codes. These must be maintained through SAP upgrades and support packs.
JPK Extractor Modifications
SAP's standard JPK extractors do not include KSeF reference fields. Custom extraction logic must be built to pull KSeF IDs from custom storage and include them in the JPK_VDEK XML output.
Mapping Complexity
The mapping between SAP invoice document numbers and KSeF identification numbers is not one-to-one in all cases. Credit notes, corrections, and batch-processed invoices require careful mapping logic.
For businesses using API-based integrations or custom middleware, the challenge is similar: extraction mappings must be updated to include KSeF references, and the data pipeline from invoice creation through KSeF submission to JPK_VDEK filing must be end-to-end traceable.
What Businesses Must Do Now
With the April 2026 deadline now live for all businesses, immediate action is required. Here's a prioritised action plan:
Review how your JPK_VDEK file is currently generated. Identify where invoice data is extracted from and whether KSeF identification numbers are included. If they are not, you are at immediate risk of rejection.
Ensure that every invoice submitted to KSeF has its KSeF identification number stored and linked to the original invoice record. This link must be queryable when generating the JPK_VDEK file.
Whether you use SAP BAdIs, custom middleware, or API integrations, update your JPK_VDEK extraction logic to include the new KSeF reference fields. Test thoroughly against the updated schema.
Implement logic to correctly apply OFF, BFK, or DI reference codes where a KSeF ID is legitimately unavailable. Each exception must be documented and justifiable in case of audit.
Run pre-submission validation on every JPK_VDEK file against the updated schema. Catch missing or malformed KSeF references before they reach the tax authority and trigger rejection.
How InvoStaq Solves This
InvoStaq's platform eliminates the complexity of KSeF-to-JPK_VDEK compliance by automating the entire reference chain:
Automatic KSeF ID Capture
When InvoStaq submits your invoice to KSeF, the returned KSeF identification number is automatically captured, stored, and linked to the original invoice record. No manual step required.
JPK_VDEK Pre-Population
InvoStaq automatically includes the correct KSeF reference (ID or exception code) in your JPK_VDEK data extraction. The right field is populated for every single invoice line.
Pre-Submission Validation
Before your JPK_VDEK file is submitted, InvoStaq validates it against the updated schema. Missing KSeF references are flagged and corrected before they can trigger a rejection.
ERP-Native Integration
For SAP, Dynamics 365, and Odoo users, InvoStaq handles the KSeF ID storage and JPK mapping externally, eliminating the need for custom BAdIs, Z-tables, or extractor modifications.
By handling the KSeF-to-JPK_VDEK reference chain as a managed service, InvoStaq removes the single biggest implementation risk businesses face today: the gap between issuing invoices through KSeF and correctly reporting them in VAT returns.
Don't Risk VAT Return Rejections
InvoStaq automates KSeF compliance and JPK_VDEK reference population — so your VAT returns are always complete, validated, and accepted first time.