---
title: "Cancel Payment Batch"
method: POST
path: "/companies/{company_id}/payroll/payment-batches/{batch_id}/cancel"
tags: ["payroll"]
---

# Cancel Payment Batch

`POST /companies/{company_id}/payroll/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}/payroll/payment-batches/{batch_id}/cancel`
- Auth: none declared

Cancel a generated batch (blocked once the run is paid).

## Path parameters

- `company_id` string, required
- `batch_id` string, required

## Headers

- `authorization` string, nullable

## Cookies

- `access_token` string, nullable

## Response `200`

Successful Response

- PaymentBatchOut
  - `id` string, required
  - `payroll_run_id` string, required
  - `status` 'generated' | 'cancelled', required: Salary payment batch lifecycle (payroll SP7): at most one ``generated`` batch per run (partial unique index); regeneration goes through cancel.
  - `debtor_bank_account_id` string, required
  - `execution_date` string, date, required
  - `msg_id` string, required
  - `nb_of_txs` integer, required
  - `ctrl_sum` string, required
  - `filename` string, required
  - `created_at` string, date-time, required
  - `created_by` string, nullable
  - `cancelled_at` string, date-time, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/zeno-works/apis/zeno-api.md) · [All operations](https://skmtc.dev/zeno-works/apis/zeno-api/llms.txt) · [OpenAPI document](https://skmtc.dev/zeno-works/apis/zeno-api/revisions/1eb93dde146c?raw)
