Submit Evidence
Submit supporting evidence for a chargeback dispute. At least one evidence item is required.
POST
https://api.zenpayz.com/merchant/api/v1/chargebacks/:chargebackId/evidenceBearer · 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 |
Body Parameters
| Parameter | Type | Description |
|---|---|---|
evidence REQUIRED | array | Array of evidence items (minimum 1) |
notes OPTIONAL | string | Additional notes to accompany the evidence submission |
Response
Success (200 OK)
{
"success": true,
"data": {
"chargebackId": "cb_a1b2c3d4e5f6g7h8",
"status": "evidence_submitted",
"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"
},
{
"type": "shipping_proof",
"documentUrl": "https://files.zenpayz.com/evidence/tracking_001.pdf",
"fileName": "tracking_001.pdf",
"mimeType": "application/pdf",
"fileSize": 153600,
"description": "Shipping confirmation with tracking number",
"submittedAt": "2024-01-18T14:22:00.000Z"
}
],
"notes": "Product was delivered and signed for on Jan 12.",
"updatedAt": "2024-01-18T14:22:00.000Z"
},
"message": "Evidence submitted successfully",
"error": null,
"meta": {
"request_id": "req_xxxxx",
"timestamp": "2024-01-18T14:22:00.000Z",
"processing_time_ms": 62,
"api_version": "v1",
"endpoint": "POST /chargebacks/:chargebackId/evidence",
"user_type": "merchant"
}
}
Error Responses
| Code | HTTP | Message |
|---|---|---|
| VALIDATION_ERROR | 400 | Invalid request parameters or empty evidence array |
| UNAUTHORIZED | 401 | Invalid API key |
| CHARGEBACK_NOT_FOUND | 404 | Chargeback with the specified ID does not exist |
| INVALID_STATE | 409 | Chargeback is not in a state that accepts evidence |
| DEADLINE_EXPIRED | 410 | Evidence submission deadline has passed |
Examples
- cURL
- JavaScript
- SDK
curl -X POST https://api.zenpayz.com/merchant/api/v1/chargebacks/cb_a1b2c3d4e5f6g7h8/evidence \
-H "Authorization: Bearer zp_test_xxxxx" \
-H "X-Timestamp: 2024-01-18T14:22: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" \
-d '{
"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"
},
{
"type": "shipping_proof",
"documentUrl": "https://files.zenpayz.com/evidence/tracking_001.pdf",
"fileName": "tracking_001.pdf",
"mimeType": "application/pdf",
"fileSize": 153600,
"description": "Shipping confirmation with tracking number"
}
],
"notes": "Product was delivered and signed for on Jan 12."
}'
const response = await fetch('https://api.zenpayz.com/merchant/api/v1/chargebacks/cb_a1b2c3d4e5f6g7h8/evidence', {
method: 'POST',
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,
},
body: JSON.stringify({
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',
},
{
type: 'shipping_proof',
documentUrl: 'https://files.zenpayz.com/evidence/tracking_001.pdf',
fileName: 'tracking_001.pdf',
mimeType: 'application/pdf',
fileSize: 153600,
description: 'Shipping confirmation with tracking number',
},
],
notes: 'Product was delivered and signed for on Jan 12.',
}),
});
const result = await response.json();
console.log(result.data.status); // "evidence_submitted"
console.log(result.data.evidence.length); // 2
const result = await zenpays.chargebacks.submitEvidence('cb_a1b2c3d4e5f6g7h8', {
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',
},
{
type: 'shipping_proof',
documentUrl: 'https://files.zenpayz.com/evidence/tracking_001.pdf',
fileName: 'tracking_001.pdf',
mimeType: 'application/pdf',
fileSize: 153600,
description: 'Shipping confirmation with tracking number',
},
],
notes: 'Product was delivered and signed for on Jan 12.',
});
console.log(result.status); // "evidence_submitted"
console.log(result.evidence.length); // 2