# Payout batches (/fr/docs/payout-batches)

<Endpoint method="POST" path="/v1/payout-batches" href="/api#tag/payouts/POST/v1/payout-batches" />

```bash
curl "$CAIBO_API/v1/payout-batches" \
  -H "Authorization: Bearer $CAIBO_API_KEY" \
  -H "Idempotency-Key: nomina-2026-10" \
  -H "Content-Type: application/json" \
  -d '{
    "label": "October payroll",
    "items": [
      { "beneficiary_id": "ben_01...", "source_currency": "USDT", "amount": "350.00", "amount_side": "destination", "reference": "emp-001" },
      { "beneficiary_id": "ben_02...", "quote_id": "quo_01...", "reference": "emp-002" }
    ]
  }'
```

- From **1 to 1000** items; the body can be up to 2 MiB.
- Each item includes `beneficiary_id` and either a `quote_id` or `source_currency`, `amount`, and `amount_side`. Optional: `description` and `reference` (your id, up to 64 characters).
- The shape of **all** items is checked first: one malformed item rejects the whole batch with `400` and `param: items[i].field`, and nothing is created.
- Then each item becomes a regular payout, in order, with its own `payout.*` events. An item that can't be paid doesn't stop the others.

## The batch [#the-batch]

`GET /v1/payout-batches/{id}` returns `summary` (how many items are in each status) and `totals` per currency (`principal`, `platform_fee`, `tenant_markup`, `total`, `completed_total`).

| `status` | Meaning |
| --- | --- |
| `accepted` | Received. |
| `processing` | Paying. |
| `completed` | All finished successfully. |
| `completed_with_failures` | Finished, with some failures. |
| `cancelled`, `partially_cancelled` | Cancelled, fully or in part. |

## The items [#the-items]

<Endpoint method="GET" path="/v1/payout-batches/{id}/items" href="/api#tag/payouts/GET/v1/payout-batches/{id}/items" />

Each item includes `index`, `status`, `payout_id`, and your `reference`. If it never became a payout it stays `refused`, with an `error_code`: `beneficiary_not_found`, `quote_expired`, `limit_exceeded`, `customer_not_active`…

## Cancel [#cancel]

<Endpoint method="POST" path="/v1/payout-batches/{id}/cancel" href="/api#tag/payouts/POST/v1/payout-batches/{id}/cancel" />

Cancels the batch's payouts that haven't gone out yet. Events: `payout_batch.created`, `payout_batch.cancellation_requested`, `payout_batch.cancellation_finished`, `payout_batch.completed`.
