Bulk Upload Status
Check the processing status of a bulk chargeback upload batch.
GET
https://api.zenpayz.com/merchant/api/v1/chargebacks/bulk/:batchIdBearer · 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 |
Content-Type REQUIRED | application/json |
X-Merchant-Id REQUIRED | Merchant identifier |
X-Request-Id REQUIRED | Unique request identifier |
Path Parameters
| Parameter | Type | Description |
|---|---|---|
batchId REQUIRED | string | Unique batch identifier returned from the bulk upload |
Response
Success (200 OK)
{
"success": true,
"data": {
"batchId": "batch_a1b2c3d4e5f6g7h8",
"status": "completed",
"totalRecords": 150,
"processedRecords": 147,
"failedRecords": 3,
"createdAt": "2024-01-15T10:30:00.000Z",
"completedAt": "2024-01-15T10:32:45.000Z"
},
"message": "Batch status retrieved successfully",
"error": null,
"meta": {
"request_id": "req_xxxxx",
"timestamp": "2024-01-15T10:33:00.000Z",
"processing_time_ms": 28,
"api_version": "v1",
"endpoint": "GET /chargebacks/bulk/:batchId",
"user_type": "merchant"
}
}
Error Responses
| Code | HTTP | Message |
|---|---|---|
| UNAUTHORIZED | 401 | Invalid API key |
| BATCH_NOT_FOUND | 404 | Batch with the specified ID does not exist |
Examples
- cURL
- JavaScript
- SDK
curl -X GET https://api.zenpayz.com/merchant/api/v1/chargebacks/bulk/batch_a1b2c3d4e5f6g7h8 \
-H "Authorization: Bearer zp_test_xxxxx" \
-H "X-Timestamp: 2024-01-15T10:33:00.000Z" \
-H "X-Signature: a1b2c3d4e5f6..." \
-H "X-Secret-Salt: your_secret_salt" \
-H "Content-Type: application/json" \
-H "X-Merchant-Id: merch_xxxxx" \
-H "X-Request-Id: req_xxxxx"
const response = await fetch('https://api.zenpayz.com/merchant/api/v1/chargebacks/bulk/batch_a1b2c3d4e5f6g7h8', {
method: 'GET',
headers: {
'Authorization': `Bearer ${apiKey}`,
'X-Timestamp': timestamp,
'X-Signature': signature,
'X-Secret-Salt': secretSalt,
'Content-Type': 'application/json',
'X-Merchant-Id': merchantId,
'X-Request-Id': requestId,
},
});
const result = await response.json();
console.log(result.data.batchId); // "batch_a1b2c3d4e5f6g7h8"
console.log(result.data.status); // "completed"
console.log(result.data.processedRecords); // 147
console.log(result.data.failedRecords); // 3
const batch = await zenpays.chargebacks.bulkUploadStatus('batch_a1b2c3d4e5f6g7h8');
console.log(batch.batchId); // "batch_a1b2c3d4e5f6g7h8"
console.log(batch.status); // "completed"
console.log(batch.processedRecords); // 147
console.log(batch.failedRecords); // 3