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.
POST
https://api.zenpays.com/payment/api/v1/batch-payouts/{batchId}/confirmBearer · API key
Request
Path Parameters
| Parameter | Type | Description |
|---|---|---|
batchId REQUIRED | string | Batch payout ID |
Headers
| Header | Description |
|---|---|
Authorization REQUIRED | Bearer {api_key} |
X-Signature REQUIRED | HMAC-SHA256 signature |
X-Timestamp REQUIRED | ISO 8601 timestamp |
X-Secret-Salt REQUIRED | Secret salt for HMAC validation |
Response
Success (200 OK)
{
"success": true,
"data": {
"batchId": "batch_xxxxx",
"status": "processing",
"message": "Batch payout processing started with 50 payouts"
}
}
Error Responses
| Code | HTTP | Message |
|---|---|---|
| BATCH_CONFIRM_FAILED | 400 | Batch not in validated status |
| INSUFFICIENT_BALANCE | 400 | Wallet balance too low for the total debited amount |
| BATCH_NOT_FOUND | 404 | Batch payout doesn't exist |
Examples
- cURL
- SDK
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"
const result = await zenpays.payouts.confirmBatch('batch_xxxxx')
console.log(result.status) // 'processing'