Get Chargeback
Retrieve full details of a specific chargeback including evidence and merchant response.
GET
https://api.zenpayz.com/merchant/api/v1/chargebacks/:chargebackIdBearer · 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 |
|---|---|---|
chargebackId REQUIRED | string | Unique chargeback identifier |
Response
Success (200 OK)
{
"success": true,
"data": {
"chargebackId": "cb_a1b2c3d4e5f6g7h8",
"transactionId": "txn_f8e7d6c5b4a39281",
"amount": 150.00,
"currency": "USD",
"reason": "fraudulent",
"source": "card_network",
"reasonCode": "10.4",
"reasonDescription": "Other Fraud - Card-Absent Environment",
"externalChargebackId": "ext_cb_12345",
"status": "evidence_requested",
"outcome": "pending",
"priority": "high",
"disputeDeadline": "2024-02-15T23:59:59.000Z",
"evidenceDeadline": "2024-02-10T23:59:59.000Z",
"evidence": [
{
"type": "receipt",
"documentUrl": "https://files.zenpayz.com/evidence/receipt_001.pdf",
"fileName": "receipt_001.pdf",
"mimeType": "application/pdf",
"fileSize": 204800,
"description": "Original transaction receipt",
"submittedAt": "2024-01-18T14:22:00.000Z"
}
],
"merchantResponse": "Customer received the product on Jan 12. Delivery confirmation attached.",
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-01-18T14:22:00.000Z"
},
"message": "Chargeback retrieved successfully",
"error": null,
"meta": {
"request_id": "req_xxxxx",
"timestamp": "2024-01-15T10:30:00.000Z",
"processing_time_ms": 32,
"api_version": "v1",
"endpoint": "GET /chargebacks/:chargebackId",
"user_type": "merchant"
}
}
Error Responses
| Code | HTTP | Message |
|---|---|---|
| UNAUTHORIZED | 401 | Invalid API key |
| CHARGEBACK_NOT_FOUND | 404 | Chargeback with the specified ID does not exist |
Examples
- cURL
- JavaScript
- SDK
curl -X GET https://api.zenpayz.com/merchant/api/v1/chargebacks/cb_a1b2c3d4e5f6g7h8 \
-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" \
-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/cb_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.chargebackId); // cb_a1b2c3d4e5f6g7h8
console.log(result.data.evidence); // [{ type: "receipt", ... }]
console.log(result.data.merchantResponse); // "Customer received the product..."
const chargeback = await zenpays.chargebacks.get('cb_a1b2c3d4e5f6g7h8');
console.log(chargeback.chargebackId); // cb_a1b2c3d4e5f6g7h8
console.log(chargeback.evidence); // [{ type: "receipt", ... }]
console.log(chargeback.merchantResponse); // "Customer received the product..."