Not tax advice. Computation tools only. Have a professional check your work before filing.
openaccountants/skills/poland-einvoice.md

Use this skill with your AI agent

View on GitHub

Paste this skill into your AI agent's context, or save the file to your project. Works with any AI agent that reads markdown.

poland-einvoice.md398 lines19.0 KB
v10Poland
Not yet verified by an accountantContact accountant
1---
2name: poland-einvoice
3description: >
4 Use this skill whenever asked about Polish e-invoicing, KSeF, Krajowy System e-Faktur, faktura ustrukturyzowana, FA(3) schema, structured invoice Poland, e-Faktura, UPO (Urzędowe Poświadczenie Odbioru), KSeF API, KSeF 2.0, batch submission Poland, offline mode KSeF, GTU codes, split payment MPP, NIP validation, or any question about issuing, receiving, validating, or archiving electronic invoices in Poland. Also trigger when preparing FA(3) XML invoices, configuring KSeF API integration, handling KSeF rejection errors, or advising on the transition to mandatory KSeF. This skill covers the FA(3) schema, KSeF API architecture, mandatory fields, validation rules, archiving, penalties, and interaction with Polish VAT returns. ALWAYS read this skill before touching any Polish e-invoicing work.
5version: 1.0
6jurisdiction: PL
7category: invoicing
8depends_on:
9 - einvoice-workflow-base
10---
11 
12# Poland E-Invoicing -- KSeF (Krajowy System e-Faktur) Skill v1.0
13 
14---
15 
16## Section 1 -- Quick Reference
17 
18| Field | Value |
19|---|---|
20| Country | Poland (Rzeczpospolita Polska) |
21| Currency | PLN (Polish złoty); foreign currency invoices also supported |
22| E-invoicing system | KSeF (Krajowy System e-Faktur) -- Krajowy System e-Faktur 2.0 |
23| Invoice format | FA(3) XML (proprietary Polish schema, NOT EN 16931) |
24| Governing body | Ministerstwo Finansów (Ministry of Finance) |
25| Tax authority | Krajowa Administracja Skarbowa (KAS) |
26| Key legislation | Act of 29 October 2021 amending VAT Act (Dz.U. 2021 poz. 2076); RD on KSeF implementation; VAT Act Art. 106na--106nd |
27| Portal URL | https://ksef.podatki.gov.pl |
28| Schema URL | https://crd.gov.pl/wzor/2025/06/25/13775/ (FA(3) production) |
29| API documentation | OpenAPI 3.0.4 specification at ksef.podatki.gov.pl |
30| Phase 1 mandatory | 1 February 2026 (businesses with 2024 VAT sales > PLN 200M) |
31| Phase 2 mandatory | 1 April 2026 (all remaining VAT-registered businesses) |
32| Penalties effective | 1 January 2027 |
33| Current status | Fully operational in production since 1 February 2026 |
34| Skill version | 1.0 |
35 
36---
37 
38## Section 2 -- Mandate Scope
39 
40### Who Must Comply
41 
42| Scope | From | Requirement |
43|---|---|---|
44| Large taxpayers (2024 VAT sales > PLN 200M) | 1 February 2026 | Must issue all B2B invoices via KSeF |
45| All remaining VAT-registered businesses | 1 April 2026 | Must issue all B2B invoices via KSeF |
46| B2G | 1 February 2026 | Invoices to public entities must be issued via KSeF (integration with PEF -- Platforma Elektronicznego Fakturowania) |
47| B2C | Not mandatory | Consumer invoices may be issued outside KSeF; if issued via KSeF, buyer receives a visualisation (not the XML) |
48| Foreign entities with Polish VAT registration | 1 April 2026 | Must issue structured invoices via KSeF for Polish-taxable transactions |
49| Cross-border invoices | Required | All invoices issued by Polish VAT payers, including cross-border, must be reported through KSeF |
50 
51### Exemptions
52 
53- Invoices issued by taxpayers not registered for Polish VAT
54- Tickets and simplified invoices for amounts up to PLN 450 (EUR ~100) -- exempt from KSeF but subject to Veri\*factu-like fiscal printer rules
55- Invoices from the agricultural flat-rate scheme (rolnik ryczałtowy) issued by the buyer (RR invoices use a separate FA_RR(1) schema)
56 
57### Timeline Summary
58 
59| Date | Milestone |
60|---|---|
61| October 2021 | KSeF legislative framework enacted |
62| January 2022 | Voluntary KSeF 1.0 launched |
63| September 2023 | FA(2) schema published |
64| April 2025 | AEAT Veri\*factu services enter production |
65| June 2025 | KSeF 2.0 API documentation published |
66| September 2025 | Open API testing begins |
67| October 2025 | Pre-production DEMO environment available |
68| 1 February 2026 | KSeF 2.0 production launch; mandatory for large taxpayers; FA(3) schema effective |
69| 1 April 2026 | Mandatory for all remaining VAT-registered businesses |
70| 1 January 2027 | Financial penalties for non-compliance take effect |
71 
72---
73 
74## Section 3 -- Technical Format
75 
76### FA(3) Schema
77 
78| Parameter | Value |
79|---|---|
80| Format | Proprietary Polish XML schema (NOT EN 16931 / UBL / CII) |
81| Schema version | FA(3) (effective 1 February 2026, replacing FA(2)) |
82| Schema location | https://crd.gov.pl/wzor/2025/06/25/13775/ |
83| Encoding | UTF-8 |
84| Namespace | As defined in FA(3) XSD |
85| Validation | XSD schema validation + semantic business rules |
86 
87### FA(3) Root Structure
88 
89| Element | Required | Description |
90|---|---|---|
91| `Naglowek` | Yes | Header: schema version, form code, creation date |
92| `Podmiot1` | Yes | Seller: tax ID (NIP), name, address |
93| `Podmiot2` | Yes | Buyer: tax ID (NIP or other), name, address |
94| `Podmiot3` | No | Third party (e.g., tax representative, factor) |
95| `PodmiotUpowazniony` | Conditional | Authorised entity (if issuing on behalf of seller) |
96| `Fa` | Yes | Invoice body: header data, line items, totals, payment, annotations |
97| `Stopka` | No | Footer: additional free-text information |
98| `Zalacznik` | No | Attachment node (new in FA(3) -- for structured attachments) |
99 
100### Key Differences from EN 16931
101 
102| Feature | KSeF FA(3) | EN 16931 |
103|---|---|---|
104| Schema | Proprietary Polish XSD | UBL 2.1 or CII |
105| GTU codes | Required for classified goods/services (GTU_01--GTU_13) | No equivalent |
106| MPP marker | Split payment indicator for transactions > PLN 15,000 | No equivalent |
107| Adnotacje (annotations) | Mandatory boolean fields (P_16 through P_18A, Zwolnienie, etc.) | Free-text notes |
108| Hash/chain integrity | Not in schema (KSeF assigns number) | Not applicable |
109| Peppol interoperability | Not supported -- closed national system | Core design principle |
110 
111---
112 
113## Section 4 -- Mandatory Fields
114 
115### Naglowek (Header)
116 
117| Field | Description | Required |
118|---|---|---|
119| `KodFormularza` | Form code (must be "FA") | Yes |
120| `WariantFormularza` | Schema variant (3 for FA(3)) | Yes |
121| `DataWytworzeniaFa` | XML creation datetime | Yes |
122| `SystemInfo` | Issuing system identifier | Yes |
123 
124### Podmiot1 (Seller)
125 
126| Field | Description | Required |
127|---|---|---|
128| `DaneIdentyfikacyjne/NIP` | Seller Polish tax ID (NIP, 10 digits) | Yes |
129| `DaneIdentyfikacyjne/Nazwa` | Seller full legal name | Yes |
130| `Adres` | Seller address (street, city, postal code, country) | Yes |
131 
132### Podmiot2 (Buyer)
133 
134| Field | Description | Required |
135|---|---|---|
136| `DaneIdentyfikacyjne/NIP` or `NrVatUE` or `KodUE`+`NrID` | Buyer identification | Yes (at least one) |
137| `DaneIdentyfikacyjne/Nazwa` | Buyer name | Yes |
138| `Adres` | Buyer address | Yes |
139 
140### Fa (Invoice Body)
141 
142| Field | Description | Required |
143|---|---|---|
144| `P_1` | Invoice issue date (YYYY-MM-DD) | Yes |
145| `P_2` | Invoice number (sequential) | Yes |
146| `P_3A` or `P_3B` | Sale/service date or period | Yes (one required) |
147| `FaWiersz/NrWierszaFa` | Line number (unique, sequential) | Yes |
148| `FaWiersz/P_7` | Description of goods/services | Yes |
149| `FaWiersz/P_8A` or `P_8B` | Unit of measure | Yes |
150| `FaWiersz/P_9A` or `P_9B` | Quantity | Yes |
151| `FaWiersz/P_10` | Unit net price (up to 8 decimal places) | Conditional |
152| `FaWiersz/P_11` | Line net amount (2 decimal places) | Yes |
153| `FaWiersz/P_11A` | Line VAT amount | Conditional |
154| `FaWiersz/P_12` | VAT rate (23, 8, 5, 0, zw, oo, np) | Yes |
155| `P_13_1` through `P_13_11` | Summary net amounts per rate | Conditional (per applicable rate) |
156| `P_14_1` through `P_14_5` | Summary VAT amounts per rate | Conditional |
157| `P_15` | Total gross amount (brutto) | Yes |
158 
159### Adnotacje (Annotations -- Mandatory Booleans)
160 
161| Field | Description | Values |
162|---|---|---|
163| `P_16` | Reverse charge (Art. 17 ust. 1 pkt 7/8) | 1 or 2 |
164| `P_17` | Self-supply (Art. 106a pkt 2 lit. b) | 1 or 2 |
165| `P_18` | Margin scheme | 1 or 2 |
166| `P_18A` | Mechanism of split payment (MPP) | 1 or 2 |
167| `Zwolnienie` | VAT exemption basis | Selection required if any line is "zw" |
168 
169### GTU Codes (Goods/Services Classification)
170 
171| Code | Category |
172|---|---|
173| GTU_01 | Alcohol |
174| GTU_02 | Fuel |
175| GTU_03 | Heating oil |
176| GTU_04 | Tobacco |
177| GTU_05 | Waste |
178| GTU_06 | Electronic devices |
179| GTU_07 | Vehicles and parts |
180| GTU_08 | Precious metals |
181| GTU_09 | Pharmaceuticals |
182| GTU_10 | Buildings/land |
183| GTU_11 | Emission allowances |
184| GTU_12 | Intangible services (consulting, advisory, legal, management) |
185| GTU_13 | Transport services |
186 
187---
188 
189## Section 5 -- Transmission Method
190 
191### KSeF API 2.0
192 
193| Parameter | Detail |
194|---|---|
195| API specification | OpenAPI 3.0.4 (JSON) |
196| Production endpoint | `https://api.ksef.mf.gov.pl/v2` |
197| DEMO endpoint | `https://api-demo.ksef.mf.gov.pl/v2` |
198| Test endpoint | `https://api-test.ksef.mf.gov.pl/v2` |
199| Authentication | Qualified electronic signature, trusted profile (profil zaufany), or KSeF authorisation token |
200| Session types | Interactive (real-time, single invoices) or Batch (bulk submission) |
201 
202### Submission Flow
203 
2041. **Authenticate** -- open a KSeF session using certificate, trusted profile, or token
2052. **Submit** -- send FA(3) XML file via API endpoint
2063. **Validate** -- KSeF performs XSD and semantic validation
2074. **Accept or Reject** -- if valid, KSeF assigns a unique KSeF number and timestamp; if invalid, returns error
2085. **UPO** -- download Urzędowe Poświadczenie Odbioru (official receipt of acceptance) as proof of issuance
2096. **Buyer access** -- buyer retrieves invoice from KSeF using their NIP credentials
210 
211### Alternative Submission Methods
212 
213| Method | Description |
214|---|---|
215| Aplikacja Podatnika KSeF | Free web application from Ministry of Finance |
216| Aplikacja Mobilna KSeF | Free mobile app for issuing/receiving on smartphone |
217| e-mikrofirma | Integration with e-Urząd Skarbowy for micro-businesses |
218| Batch mode | Upload ZIP of multiple FA(3) XMLs; each validated individually |
219 
220### Offline Mode
221 
222If KSeF is unavailable (system downtime declared by MF), businesses may:
223 
2241. Issue invoices outside KSeF with offline numbering
2252. Submit to KSeF within 7 days of system restoration
2263. The date of issue (P_1) remains the original date; the KSeF date is the submission date
2274. Offline invoices require specific handling and must reference the offline period
228 
229### KSeF Number Format
230 
231Format: `{NIP}-{YYYYMMDD}-{sequential number}` -- assigned by KSeF upon acceptance. This number becomes the primary legal identifier of the invoice.
232 
233---
234 
235## Section 6 -- Validation Rules
236 
237### XSD Validation (First Layer)
238 
239KSeF validates every submitted XML against the FA(3) XSD. Approximately 70% of rejections are XSD validation errors.
240 
241| Common XSD Error | Cause | Resolution |
242|---|---|---|
243| Missing required element | Required field not populated (e.g., NIP in Podmiot1) | Populate all mandatory fields |
244| Wrong date format | Dates must be YYYY-MM-DD (not DD.MM.YYYY or DD/MM/YYYY) | Standardise date formatting |
245| Invalid element order | XML elements must follow XSD-defined sequence | Reorder elements per schema |
246| Wrong data type | Numeric field contains text or vice versa | Validate field types |
247| Excess decimal places | Amounts: max 2 decimals; prices: max 8; quantities: max 6 | Apply correct precision |
248 
249### Semantic Validation (Second Layer)
250 
251| Rule | Description |
252|---|---|
253| NIP checksum | Seller NIP must pass modulus-11 check digit validation |
254| Tax calculation | Sum of line net amounts per rate must equal summary amount (P_13_x); VAT amounts must equal P_14_x |
255| Gross total | P_15 must equal sum of all net amounts + all VAT amounts |
256| GTU format | Must be exact codes (e.g., `GTU_12` not `12` or `GTU 12`) |
257| Duplicate detection | Same seller NIP + invoice number + date = error 440 (duplicate) |
258| Adnotacje completeness | All mandatory annotation fields (P_16, P_17, P_18, P_18A) must be populated |
259| Zwolnienie logic | If any line has rate "zw", the Zwolnienie element must specify the exemption basis |
260| Currency handling | Foreign currency invoices must include PLN conversion amounts in separate fields |
261 
262### Common Rejection Scenarios
263 
264| Issue | Resolution |
265|---|---|
266| Polish NIP in NrVatUE field | Polish NIPs go in the NIP field; NrVatUE is for EU VAT numbers with country prefix |
267| Rounding mismatch | Use banker's rounding; ensure line totals sum to header totals within 1 grosz |
268| Negative quantities on non-corrective invoice | Only corrective invoices (korekta) may have negative values |
269| Missing Adnotacje fields | Even if not applicable, P_16 through P_18A must contain value "2" (not applicable) |
270| Invalid bank account format | Polish IBAN must be exactly 26 characters (digits only, no PL prefix in domestic format) |
271 
272---
273 
274## Section 7 -- Tax Computation Rules
275 
276### VAT Rates (2025/2026)
277 
278| Rate Code | Rate | Application |
279|---|---|---|
280| 23 | 23% | Standard rate |
281| 8 | 8% | Reduced (construction, certain food, medical) |
282| 5 | 5% | Reduced (basic food, books, periodicals) |
283| 0 | 0% | Zero-rated (intra-EU supplies, exports) |
284| zw | Exempt | VAT-exempt supplies (must specify exemption basis) |
285| oo | Not subject | Out-of-scope transactions |
286| np | Not applicable | Supplies not subject to Polish VAT (e.g., place of supply outside Poland) |
287 
288### Rounding
289 
290- Line net amount (`P_11`): 2 decimal places
291- Unit price (`P_10`): up to 8 decimal places
292- Quantity (`P_9A`/`P_9B`): up to 6 decimal places
293- VAT amount per line (`P_11A`): 2 decimal places
294- Gross total (`P_15`): 2 decimal places
295- Use banker's rounding (round half to even) for consistency with KSeF validation
296- Sum of line amounts must exactly equal the corresponding summary field -- no tolerance
297 
298### Multi-Rate Invoice Handling
299 
300- Each applicable VAT rate has dedicated summary fields (P_13_1/P_14_1 for 23%, P_13_2/P_14_2 for 8%, etc.)
301- Line items reference the rate via P_12
302- If a single invoice has lines at 23%, 8%, and exempt, all three summary pairs must be populated
303- P_15 (gross total) = sum of all P_13_x + sum of all P_14_x
304 
305### Split Payment (Mechanizm Podzielonej Płatności -- MPP)
306 
307- Mandatory for transactions > PLN 15,000 gross involving goods/services listed in Annex 15 to the VAT Act
308- Set annotation P_18A = 1 when MPP applies
309- Invoice must include the phrase "mechanizm podzielonej płatności"
310- Payment is split: net amount to seller's account, VAT amount to seller's VAT account
311 
312### Corrective Invoices (Faktury Korygujące)
313 
314- Must reference the original KSeF number of the corrected invoice
315- Show both "before" and "after" values, or the difference
316- Use same FA(3) schema with corrective-specific fields populated
317- KSeF validates that the referenced original invoice exists and belongs to the same seller NIP
318 
319---
320 
321## Section 8 -- Archiving Requirements
322 
323| Requirement | Detail |
324|---|---|
325| KSeF as legal archive | KSeF stores all accepted invoices for 10 years -- this constitutes the legal archive |
326| No separate archiving needed | Once accepted by KSeF, the invoice is legally archived; businesses do not need to maintain separate copies for VAT purposes |
327| Attachments | KSeF does NOT store attachments (Zalacznik node in FA(3) is metadata only); supporting documents (contracts, delivery notes) must be archived separately by the business |
328| UPO retention | Retain UPO (official receipt) as proof of successful submission |
329| Pre-KSeF invoices | Invoices issued before KSeF mandate remain subject to standard Polish archiving rules (5 years from end of tax year) |
330| Access | Both seller and buyer can retrieve invoices from KSeF at any time during the retention period using their NIP credentials |
331| Audit | Tax authorities have direct access to all KSeF invoices; no separate data provision needed during audits |
332 
333---
334 
335## Section 9 -- Penalties for Non-Compliance
336 
337Financial penalties take effect from 1 January 2027. During 2026, the practical consequences of non-compliance are primarily operational (invoices not legally valid for VAT deduction).
338 
339| Violation | Penalty |
340|---|---|
341| Issuing invoice outside KSeF (when mandatory) | Up to 100% of the VAT amount on the invoice |
342| Invoice not conforming to FA(3) schema | Rejection by KSeF -- invoice not legally issued; must correct and resubmit |
343| Failure to issue invoice at all | Standard VAT Act penalties apply (up to 720 daily rates under fiscal penal code) |
344| Late submission in offline mode | Must submit within 7 days of system restoration; late submission may trigger penalties |
345| Buyer deducting input VAT from non-KSeF invoice | Input VAT deduction denied -- buyer bears the risk |
346| Using non-KSeF invoices after mandate date | Trading partners on compliant systems may reject non-KSeF invoices |
347 
348### Practical Risks During 2026 (Before Penalty Enforcement)
349 
350- Invoices not submitted through KSeF are not legally valid for VAT deduction purposes
351- Trading partners may refuse non-KSeF invoices
352- Audit exposure increases as KAS cross-references KSeF data
353 
354---
355 
356## Section 10 -- Interaction with Tax Skills
357 
358### VAT Return Integration
359 
360- KSeF data directly feeds into JPK_VAT (Jednolity Plik Kontrolny) -- the standard audit file for VAT
361- JPK_V7M (monthly) and JPK_V7K (quarterly) declarations must reconcile with invoices in KSeF
362- KSeF invoice numbers are used as references in JPK records
363- GTU codes from KSeF invoices must match GTU markings in JPK_VAT
364- Split payment (MPP) markers from KSeF feed into JPK_VAT classification
365- Tax authorities can automatically cross-check KSeF invoices against JPK declarations in real-time
366 
367### e-Urząd Skarbowy Integration
368 
369- The e-mikrofirma module in e-Urząd Skarbowy connects directly to KSeF
370- Taxpayers can issue invoices in KSeF and transfer data directly to VAT records without manual re-entry
371- Pre-filled VAT returns based on KSeF data are progressively being developed
372 
373### Income Tax Integration
374 
375- For sole proprietors (JDG -- jednoosobowa działalność gospodarcza), KSeF invoice data feeds into the annual PIT-36/PIT-36L return
376- Revenue and cost figures must reconcile with KSeF records
377- KSeF provides an authoritative source for income verification during audits
378 
379### Cross-Border Considerations
380 
381- All invoices issued by Polish VAT payers, including intra-EU and export invoices, must be reported through KSeF
382- Intra-EU supplies must be reported in both KSeF and the EU VAT Information Exchange System (VIES) via VAT-UE declaration
383- Import VAT (from customs declarations) is handled separately but must reconcile with purchase invoices in KSeF
384 
385### PEF (Platforma Elektronicznego Fakturowania) Integration
386 
387- B2G invoices previously submitted through PEF are being migrated to KSeF
388- From 1 February 2026, PEF forwards invoices to KSeF production environment
389- Public entities receive invoices through KSeF with PEF acting as an intermediary during transition
390 
391---
392 
393## Disclaimer
394 
395This skill and its outputs are provided for informational and computational purposes only and do not constitute tax, legal, or financial advice. Open Accountants and its contributors accept no liability for any errors, omissions, or outcomes arising from the use of this skill. All outputs must be reviewed and signed off by a qualified professional (such as a doradca podatkowy, biegły rewident, or equivalent licensed practitioner in your jurisdiction) before filing or acting upon.
396 
397The most up-to-date, verified version of this skill is maintained at [openaccountants.com](https://openaccountants.com). Log in to access the latest version, request a professional review from a licensed accountant, and track updates as tax law changes.
398 

Run this skill, then get an accountant to check it

After running the full skill pack in your AI agent, sign up and upload your worksheet. We'll connect you with a trusted accountant in our network who can review your numbers before you file.

Verification status

Research-verified

Drafted from authoritative sources (tax authority sites, Big-4 summaries). Awaiting credentialed sign-off.

Needs section-by-section practitioner review to reach accountant-verified.

Section review progress

0/37

About

Use this skill whenever asked about Polish e-invoicing, KSeF, Krajowy System e-Faktur, faktura ustrukturyzowana, FA(3) schema, structured invoice Poland, e-Faktura, UPO (Urzędowe Poświadczenie Odbioru), KSeF API, KSeF 2.0, batch submission Poland, offline mode KSeF, GTU codes, split payment MPP, NIP validation, or any question about issuing, receiving, validating, or archiving electronic invoices in Poland. Also trigger when preparing FA(3) XML invoices, configuring KSeF API integration, handling KSeF rejection errors, or advising on the transition to mandatory KSeF. This skill covers the FA(3) schema, KSeF API architecture, mandatory fields, validation rules, archiving, penalties, and interaction with Polish VAT returns. ALWAYS read this skill before touching any Polish e-invoicing work.

PLty-2025

Use this skill

This skill is open source and free to use in any AI agent. Copy it, download it, or clone the repo. If you find an error, report an issue — a licensed accountant will review.

4 of 5 in the PL workflow: