List an escrow's chargebacks
curl --request GET \
--url https://api.ketapay.com/v1/escrows/{id}/chargebacks \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.ketapay.com/v1/escrows/{id}/chargebacks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ketapay.com/v1/escrows/{id}/chargebacks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"object": "list",
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"object": "chargeback",
"livemode": true,
"escrow_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"milestone_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"amount": 45000000,
"reason": "fraudulent",
"status": "needs_response",
"respond_by": "2023-11-07T05:31:56Z",
"recovered_from_seller": 45000000,
"commission_reversed": 45000000,
"opened_at": "2023-11-07T05:31:56Z",
"closed_at": "2023-11-07T05:31:56Z"
}
]
}{
"error": {
"type": "authentication_error",
"code": "api_key_invalid",
"message": "This API key is invalid or has been revoked.",
"param": null,
"request_id": "req_01J9ZK7M2Q4V8XW3B6N5T0R1YH"
}
}{
"error": {
"type": "invalid_request_error",
"code": "resource_not_found",
"message": "No escrow with id 3b1f6c2e-8d4a-4e7b-9c1d-2a5f8e6b7c90.",
"param": "id",
"request_id": "req_01J9ZK7M2Q4V8XW3B6N5T0R1YH"
}
}{
"error": {
"type": "rate_limit_error",
"code": "rate_limited",
"message": "Too many requests. Retry after the time in X-RateLimit-Reset.",
"param": null,
"request_id": "req_01J9ZK7M2Q4V8XW3B6N5T0R1YH"
}
}Chargebacks
List an escrow's chargebacks
GET
/
escrows
/
{id}
/
chargebacks
List an escrow's chargebacks
curl --request GET \
--url https://api.ketapay.com/v1/escrows/{id}/chargebacks \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.ketapay.com/v1/escrows/{id}/chargebacks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ketapay.com/v1/escrows/{id}/chargebacks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"object": "list",
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"object": "chargeback",
"livemode": true,
"escrow_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"milestone_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"amount": 45000000,
"reason": "fraudulent",
"status": "needs_response",
"respond_by": "2023-11-07T05:31:56Z",
"recovered_from_seller": 45000000,
"commission_reversed": 45000000,
"opened_at": "2023-11-07T05:31:56Z",
"closed_at": "2023-11-07T05:31:56Z"
}
]
}{
"error": {
"type": "authentication_error",
"code": "api_key_invalid",
"message": "This API key is invalid or has been revoked.",
"param": null,
"request_id": "req_01J9ZK7M2Q4V8XW3B6N5T0R1YH"
}
}{
"error": {
"type": "invalid_request_error",
"code": "resource_not_found",
"message": "No escrow with id 3b1f6c2e-8d4a-4e7b-9c1d-2a5f8e6b7c90.",
"param": "id",
"request_id": "req_01J9ZK7M2Q4V8XW3B6N5T0R1YH"
}
}{
"error": {
"type": "rate_limit_error",
"code": "rate_limited",
"message": "Too many requests. Retry after the time in X-RateLimit-Reset.",
"param": null,
"request_id": "req_01J9ZK7M2Q4V8XW3B6N5T0R1YH"
}
}Authorizations
Authorization: Bearer <secret key>. Secret keys belong to your organisation, are shown
once when created in the dashboard, and are scoped (see x-required-scope on each
operation). Keep them on your server. Live keys are issued after your business is
verified. Publishable keys (pk_) are only for @ketapay/checkout and don't work here.
Path Parameters
⌘I