# Pay creators with one card payment

Pays creators with one card payment.

```http
POST https://api.pozy.ai/v1/creator-campaigns/{campaignId}/payout-batches
```

- Area: Creators / Creator Campaigns
- Auth: Authorization: Bearer pz_live_...

## Path parameters

- `campaignId` (string, required)

## Header parameters

- `Idempotency-Key` (string)

## Request body

Content type: `application/json`

- `participantIds`, array of string: At least 1 item. Up to 500 items
- `excludeParticipantIds`, array of string: At least 1 item. Up to 500 items
- `paymentMethodId`, string

## Example request

```bash
curl -X POST "https://api.pozy.ai/v1/creator-campaigns/65a3737dd8b11ea61f199e6e/payout-batches" \
  -H "Authorization: Bearer $POZY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "participantIds": [
    "string"
  ],
  "excludeParticipantIds": [
    "string"
  ],
  "paymentMethodId": "6f0f324b965caaf218fe69b7"
}'
```

```ts
import { randomUUID } from "node:crypto";

const res = await fetch("https://api.pozy.ai/v1/creator-campaigns/65a3737dd8b11ea61f199e6e/payout-batches", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.POZY_API_KEY}`,
    "Idempotency-Key": randomUUID(),
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    participantIds: [
      "string"
    ],
    excludeParticipantIds: [
      "string"
    ],
    paymentMethodId: "6f0f324b965caaf218fe69b7"
  }),
});
const data = await res.json();
if (!res.ok) throw new Error(data?.error ?? `Request failed with status ${res.status}`);
console.log(data);
```

```python
import os
import requests

resp = requests.post(
    "https://api.pozy.ai/v1/creator-campaigns/65a3737dd8b11ea61f199e6e/payout-batches",
    headers={"Authorization": f"Bearer {os.environ['POZY_API_KEY']}"},
    json={
        "participantIds": [
            "string",
        ],
        "excludeParticipantIds": [
            "string",
        ],
        "paymentMethodId": "6f0f324b965caaf218fe69b7",
    },
    timeout=30,
)
resp.raise_for_status()
print(resp.json())
```

## Response 201

- `batch`, object, required
  - `id`, string, required
  - `campaignId`, string, required: Can be null
  - `status`, string, required: One of `awaiting_payment`, `paying`, `paid`, `partially_failed`, `failed`, `expired`
  - `method`, string, required: One of `card`
  - `amountCents`, integer, required
  - `feeCents`, integer, required
  - `totalCents`, integer, required
  - `items`, array of object, required
    - `id`, string, required
    - `participantId`, string, required
    - `creator`, object, required
      - `displayName`, string, required
    - `amountCents`, integer, required
    - `feeCents`, integer, required
    - `totalCents`, integer, required
    - `status`, string, required: One of `pending`, `paid`, `failed`, `skipped`
    - `failureReason`, string, required: Can be null
    - `transferId`, string, required: Can be null
  - `paidAt`, string (date-time), required: Can be null
  - `finishedAt`, string (date-time), required: Can be null
  - `createdAt`, string (date-time), required
- `payment`, object, required
  - `status`, string, required: One of `succeeded`, `processing`, `requires_action`
  - `clientSecret`, string, required: Can be null

```json
{
  "batch": {
    "id": "6bfebd43ddc270f6d2c56fc5",
    "campaignId": "65a3737dd8b11ea61f199e6e",
    "status": "awaiting_payment",
    "method": "card",
    "amountCents": 1,
    "feeCents": 1,
    "totalCents": 42,
    "items": [
      {
        "id": "6bfebd43ddc270f6d2c56fc5",
        "participantId": "6f0150243551cb6ee41f35e0",
        "creator": {
          "displayName": "Acme"
        },
        "amountCents": 1,
        "feeCents": 1,
        "totalCents": 42,
        "status": "pending",
        "failureReason": "string",
        "transferId": "6f5f6fe5901ca25e11c24ddb"
      }
    ],
    "paidAt": "2026-10-02T09:00:00.000Z",
    "finishedAt": "2026-10-02T09:00:00.000Z",
    "createdAt": "2026-10-02T09:00:00.000Z"
  },
  "payment": {
    "status": "succeeded",
    "clientSecret": "string"
  }
}
```
