Skip to main content

Chargeback Stats

Retrieve aggregated chargeback statistics including totals, win/loss rates, and urgent deadlines.

GEThttps://api.zenpays.com/merchant/api/v1/chargebacks/stats
Bearer · API key

Request​

Headers​

HeaderDescription
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

Query Parameters​

ParameterTypeDescription
startDate
OPTIONAL
stringStart date filter (ISO 8601)
endDate
OPTIONAL
stringEnd date filter (ISO 8601)
currency
OPTIONAL
stringFilter by ISO 4217 currency code

Response​

Success (200 OK)​

{
"success": true,
"data": {
"totalChargebacks": 142,
"activeDisputes": 18,
"disputedAmount": 12450.75,
"wonCount": 87,
"lostCount": 34,
"winRate": 71.9,
"urgentDeadlines": 5
},
"message": "Chargeback stats retrieved successfully",
"error": null,
"meta": {
"request_id": "req_xxxxx",
"timestamp": "2024-01-15T10:30:00.000Z",
"processing_time_ms": 55,
"api_version": "v1",
"endpoint": "GET /chargebacks/stats",
"user_type": "merchant"
}
}

Error Responses​

CodeHTTPMessage
VALIDATION_ERROR400Invalid query parameters
UNAUTHORIZED401Invalid API key

Examples​

curl -X GET "https://api.zenpays.com/merchant/api/v1/chargebacks/stats?startDate=2024-01-01T00:00:00.000Z&endDate=2024-01-31T23:59:59.000Z&currency=USD" \
-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"