Get Batch Payout
Retrieve the status and progress of a batch payout.
GET
https://api.zenpays.com/payment/api/v1/batch-payouts/{batchId}Bearer · 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",
"totalPayouts": 50,
"successfulPayouts": 35,
"failedPayouts": 3,
"pendingPayouts": 12,
"progressPercentage": 76,
"totalAmount": 250000,
"currency": "INR",
"totalFees": 1250,
"processingStats": {}
}
}
Error Responses
| Code | HTTP | Message |
|---|---|---|
| BATCH_NOT_FOUND | 404 | Batch payout doesn't exist |
| UNAUTHORIZED | 401 | Invalid API key |
Examples
- cURL
- SDK
curl "https://api.zenpays.com/payment/api/v1/batch-payouts/batch_xxxxx" \
-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 batch = await zenpays.payouts.getBatch('batch_xxxxx')
console.log(`Progress: ${batch.progressPercentage}%`)
console.log(`Successful: ${batch.successfulPayouts}/${batch.totalPayouts}`)