Skip to main content

Add Response

Add a merchant response to a chargeback dispute.

POSThttps://api.zenpayz.com/merchant/api/v1/chargebacks/:chargebackId/response
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

Path Parameters

ParameterTypeDescription
chargebackId
REQUIRED
stringUnique chargeback identifier

Body Parameters

ParameterTypeDescription
response
REQUIRED
stringMerchant response text (must be non-empty)

Response

Success (200 OK)

{
"success": true,
"data": {
"chargebackId": "cb_a1b2c3d4e5f6g7h8",
"status": "pending_review",
"merchantResponse": "The customer received the product on January 12th. Delivery was confirmed with a signature. The tracking number is 1Z999AA10123456784. We have attached the signed delivery receipt and shipping confirmation as evidence.",
"updatedAt": "2024-01-19T09:15:00.000Z"
},
"message": "Response added successfully",
"error": null,
"meta": {
"request_id": "req_xxxxx",
"timestamp": "2024-01-19T09:15:00.000Z",
"processing_time_ms": 40,
"api_version": "v1",
"endpoint": "POST /chargebacks/:chargebackId/response",
"user_type": "merchant"
}
}

Error Responses

CodeHTTPMessage
VALIDATION_ERROR400Invalid request parameters or empty response
UNAUTHORIZED401Invalid API key
CHARGEBACK_NOT_FOUND404Chargeback with the specified ID does not exist
INVALID_STATE409Chargeback is not in a state that accepts responses

Examples

curl -X POST https://api.zenpayz.com/merchant/api/v1/chargebacks/cb_a1b2c3d4e5f6g7h8/response \
-H "Authorization: Bearer zp_test_xxxxx" \
-H "X-Timestamp: 2024-01-19T09:15: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 '{
"response": "The customer received the product on January 12th. Delivery was confirmed with a signature. The tracking number is 1Z999AA10123456784."
}'