payments

Cancel Payment Batch

draft | pending_approval | approved → cancelled (accountant, ZCT-257).

approved since ZENO-231: the release re-check can refuse an approved batch, and nothing leaves Zeno before the first download, so cancel is its exit. exported is final. Cancelling an approved batch withdraws its vouching for later batches' first-time-supplier flags (warn-only; not recomputed).

Was member-level on the reasoning that nothing has moved money before approval — a deliberate divergence from payroll's accountant-gated cancel. The owner withdrew that on 2026-08-31, and the divergence goes with it: both cancels are accountant now.

⚠️ Note what the old rationale claimed and the code never did. It said "a member may withdraw their own not-yet-approved batch"; there is no author scoping anywhere on this path — repo.get_batch filters on company_id and id alone, and created_by is written at creation and read by nothing. Before this gate, any member could cancel any other member's pending_approval batch seconds before approval. The role gate closes it for members; author scoping is still the right fix and is filed.

post/companies/{company_id}/payment-batches/{batch_id}/cancel

Request

  • Base URL: https://app.zeno-works.ch (the document declares no server; this is the origin it was published from)
  • URL: https://app.zeno-works.ch/companies/{company_id}/payment-batches/{batch_id}/cancel
  • Auth: none declared

Path parameters

company_idstring required
batch_idstring required

Headers

authorizationstring nullable

Cookies

access_tokenstring nullable

Response

Successful Response

idstring required
company_idstring required
debtor_bank_account_idstring required
status'draft' | 'pending_approval' | 'approved' | 'exported' | 'cancelled' required

AP payment batch approval lifecycle (doc/pipeline.md §"Exports (accounting hand-off)").

draft → pending_approval → approved → exported (+ cancel from draft/pending/approved — ZENO-231; exported is final). Rejection is a transition back to draft, not a state — the rejected_* audit columns record the last rejection. The XML is downloadable only in approved/exported; the first download stamps approved → exported.

execution_datestring date required
msg_idstring required
nb_of_txsinteger required
ctrl_sumstring required
filenamestring required
created_bystring nullable
created_atstring date-time required
submitted_bystring nullable
submitted_atstring date-time nullable
approved_bystring nullable
approved_atstring date-time nullable
rejected_bystring nullable
rejected_atstring date-time nullable
reject_reasonstring nullable
exported_bystring nullable
exported_atstring date-time nullable
cancelled_bystring nullable
cancelled_atstring date-time nullable

Changes

No recorded changes to this operation across all 1 revision of this API.