---
title: "Create Payment Batch"
method: POST
path: "/companies/{company_id}/payroll/runs/{run_id}/payment-batches"
tags: ["payroll"]
---

# Create Payment Batch

`POST /companies/{company_id}/payroll/runs/{run_id}/payment-batches`

## 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/runs/{run_id}/payment-batches`
- Auth: none declared

Generate + persist the run's salary pain.001. 409 when an open batch
exists / the run is not posted; 422 listing ALL ineligible employees.

## Path parameters

- `company_id` string, required
- `run_id` string, required

## Headers

- `authorization` string, nullable

## Cookies

- `access_token` string, nullable

## Request body

- PaymentBatchCreate
  - `debtor_bank_account_id` string, required
  - `execution_date` string, date, nullable

## Response `201`

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)
