<!-- ZenPays documentation · https://docs.zenpays.com/docs/rest-api/endpoints/payouts/confirm-batch-payout -->

# Confirm Batch Payout

Confirm a validated batch payout to start processing. The system checks the merchant's wallet balance, blocks the required amount, creates individual payout records, and begins processing.

<EndpointHeader verb="POST" path="/payment/api/v1/batch-payouts/{batchId}/confirm" />

## Request

### Path Parameters

<ParamTable
  rows={[
    { name: "batchId", type: "string", required: true, desc: "Batch payout ID" },
  ]}
/>

### Headers

<ParamTable
  label="Header"
  rows={[
    { name: "Authorization", required: true, desc: "`Bearer {api_key}`" },
    { name: "X-Signature", required: true, desc: "HMAC-SHA256 signature" },
    { name: "X-Timestamp", required: true, desc: "ISO 8601 timestamp" },
    { name: "X-Secret-Salt", required: true, desc: "Secret salt for HMAC validation" },
  ]}
/>

## Response

### Success (200 OK)

```json
{
  "success": true,
  "data": {
    "batchId": "batch_xxxxx",
    "status": "processing",
    "message": "Batch payout processing started with 50 payouts"
  }
}
```

### Error Responses

<ErrorTable
  rows={[
    { code: "BATCH_CONFIRM_FAILED", status: "400", message: "Batch not in `validated` status" },
    { code: "INSUFFICIENT_BALANCE", status: "400", message: "Wallet balance too low for the total debited amount" },
    { code: "BATCH_NOT_FOUND", status: "404", message: "Batch payout doesn't exist" },
  ]}
/>

<CodeRail>

## Examples

<Tabs groupId="language">
  <TabItem value="curl" label="cURL" default>

```bash
curl -X POST "https://api.zenpays.com/payment/api/v1/batch-payouts/batch_xxxxx/confirm" \
  -H "Authorization: Bearer zp_test_xxxxx" \
  -H "X-Timestamp: 2024-01-15T10:30:00.000Z" \
  -H "X-Signature: a1b2c3d4e5f6..." \
  -H "X-Secret-Salt: your_secret_salt"
```

  </TabItem>
  <TabItem value="sdk" label="SDK">

```javascript
const result = await zenpays.payouts.confirmBatch('batch_xxxxx')
console.log(result.status) // 'processing'
```

  </TabItem>
</Tabs>

</CodeRail>

## Related Endpoints

- [Create Batch Payout](/docs/rest-api/endpoints/payouts/create-batch-payout)
- [Get Batch Payout](/docs/rest-api/endpoints/payouts/get-batch-payout)
- [Cancel Batch Payout](/docs/rest-api/endpoints/payouts/cancel-batch-payout)
