---
title: "Create a payment batch"
method: POST
path: "/api/v1/payment-batch"
tags: ["Payment Batches"]
---

# Create a payment batch

`POST /api/v1/payment-batch`

## Request

- Base URL: `https://sandbox.api.afriex.com`
- URL: `https://sandbox.api.afriex.com/api/v1/payment-batch`
- Auth: API key in header `x-api-key`
- TypeScript: <https://skmtc.dev/afriex/apis/afriex-business-api/docs/api/v1/payment-batch/post.ts> (a function with typed inputs; its response is checked against the schema)

Creates an empty batch. Add recipients with the recipient endpoints, then start the payouts with POST /api/v1/payment-batch/{batchId}/withdraw. Requires the `PAYMENT_BATCH.CREATE` key permission.

## Request body

- PaymentBatchRequest
  - `name` string, required: A label for the batch.
  - `sourcePaymentMethod` object, required: The wallet the batch is funded from. Every payout is converted from this currency. Other keys are ignored and not stored.
    - `channel` 'WALLET'
    - `currencyCode` string, required

## Response `201`

The batch was created

- object
  - `data` PaymentBatch: A payment batch, including the method payouts are funded from.
    - `id` string
    - `name` string
    - `sourcePaymentMethod` object: The wallet the batch is funded from.
      - `channel` 'WALLET'
      - `currencyCode` string

## Other responses

- `400`: The request is invalid, the `batchId` in the path is not a valid id (`INVALID_BUSINESS_PAYMENT_BATCH_REQUEST`), or it came from an IP outside the business's whitelist, carried a bad payload signature or named an unsupported `x-api-version`.
- `401`: Missing or invalid API key, or a key without the permission this endpoint requires.
- `500`: Server error.
- `503`: Temporarily unavailable: an upstream service failed or timed out, or the API is momentarily offline. Retry with backoff and honour the Retry-After header when present.

---

[API](https://skmtc.dev/afriex/apis/afriex-business-api.md) - [All operations](https://skmtc.dev/afriex/apis/afriex-business-api/llms.txt) - [OpenAPI document](https://skmtc.dev/afriex/apis/afriex-business-api/revisions/d94198b6c256?raw)
