FinchContext
Run with

Build the ZUS Settlement Envelope (KEDU XML)

Skill: Assemble payroll documents into a consolidated ZUS KEDU submission

Region: Poland (Polska) Category: Social security — Ubezpieczenia społeczne (ZUS) Does: Takes the individual ZUS documents produced from payroll (DRA, RCA, RSA) and registration documents (ZUA, ZWUA, ZZA) and wraps them in a single KEDU XML — the parent submission unit (Kompleksowy Elektroniczny Dokument Ubezpieczeniowy) that employers (płatnicy składek) transmit through Płatnik / ePłatnik (PUE/eZUS) to ZUS. Spec: ZUS KEDU XML wrapper / interchange document (current Płatnik version; document templates revised May 2025)

KEDU is not a form but the transport envelope: one KEDU file carries an ordered set of insurance documents for a payer, all sharing the same payer identity. This skill focuses on the wrapper — how DRA/RCA/RSA and the registration documents nest inside it, the payer-block consistency, and document ordering — and defers the per-document content to build-zus-dra-rca-xml and build-zus-rsa-zua-xml. Element names follow the KEDU/Płatnik structures, not a verbatim XSD.


When this applies


Structure (KEDU → nested documents)

KEDU
  Header        producer/program ID + version, creation timestamp, document count
  Płatnik       NIP, REGON, ZUS payer ID, name (one identity for the whole file)
  Documents     ordered list, each with an internal document number:
     ZUA   registration to insurance (see build-zus-rsa-zua-xml)
     ZWUA  deregistration (with cessation reason code)
     ZZA   registration to health insurance only
     DRA   settlement declaration — one per payer per period (see build-zus-dra-rca-xml)
     RCA   per-insured contribution report (rolls up into DRA)
     RSA   per-insured benefits/breaks report (reduces RCA base)
  Trailer       totals / document checksum

Data rules


Worked example (outline)

KEDU (płatnik NIP 1234567890, REGON ..., 4 documents)
  doc 01  ZUA  new hire PESEL 90010112345, title 011000, from 2025-06-01
  doc 02  RCA  same insured — June contributions
  doc 03  RSA  same insured — sick-pay break 2025-06-10..16
  doc 04  DRA  payer summary June 2025 = Σ RCA

Emitted as one KEDU XML and submitted via Płatnik/ePłatnik (PUE/eZUS) to ZUS; the contained documents reconcile internally.


Validation checklist


Last updated: 2026-06-04 — confirm the current KEDU/Płatnik schema and the DRA/RCA/RSA/ZUA/ZWUA/ZZA template versions (revised May 2025) and deadlines against current ZUS (zus.pl) guidance before use.