List Batch Payouts
List all batch payouts for the merchant with optional filters.
GET
https://api.zenpays.com/payment/api/v1/batch-payoutsBearer · API key
Request
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 |
Query Parameters
| Parameter | Type | Description |
|---|---|---|
page OPTIONAL | number | Page number (default: 1) |
limit OPTIONAL | number | Items per page (default: 20) |
status OPTIONAL | string | Filter by status |
fromDate OPTIONAL | string | Start date (ISO format) |
toDate OPTIONAL | string | End date (ISO format) |
Response
Success (200 OK)
{
"success": true,
"data": {
"batches": [
{
"batchId": "batch_xxxxx",
"fileName": "json_batch_batch_xxxxx",
"status": "completed",
"totalPayouts": 50,
"successfulPayouts": 48,
"failedPayouts": 2,
"pendingPayouts": 0,
"totalAmount": 250000,
"currency": "INR",
"totalFees": 1250,
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-01-15T11:00:00.000Z",
"progressPercentage": 100
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 5,
"totalPages": 1,
"hasNext": false,
"hasPrev": false
}
}
}
Examples
- cURL
- SDK
curl "https://api.zenpays.com/payment/api/v1/batch-payouts?status=completed&limit=10" \
-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 { data } = await zenpays.payouts.listBatches({
status: 'completed',
limit: 10,
})
data.forEach(batch => {
console.log(`${batch.batchId}: ${batch.successfulPayouts}/${batch.totalPayouts} succeeded`)
})