Get an event
curl --request GET \
--url https://api.ketapay.com/v1/events/{id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.ketapay.com/v1/events/{id}', 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/events/{id}",
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;
}{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"object": "event",
"type": "checkout_session.expired",
"api_version": "v1",
"livemode": true,
"created_at": "2023-11-07T05:31:56Z",
"data": {
"object": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"object": "checkout_session",
"livemode": true,
"status": "open",
"url": "https://app.ketapay.com/checkout/2c9a7f4e-1b3d-4e6a-8f2c-5d7b9e1a3c60",
"amount": 45000000,
"currency": "NGN",
"fees": {
"amount": 45000000,
"buyer_fee": 2250000,
"buyer_vat": 168750,
"buyer_total": 152418750,
"seller_fee": 2250000,
"commission": 15000000,
"seller_payout": 132750000
},
"category": "other",
"title": "<string>",
"description": "<string>",
"images": [
{
"file": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"url": "<string>",
"thumbnail_url": "<string>",
"alt": "<string>"
}
],
"attachments": [
{
"file": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Project brief.pdf",
"url": "<string>"
}
],
"milestones": [
{
"title": "Design",
"amount": 45000000,
"description": "<string>",
"due_date": "2023-12-25"
}
],
"buyer": {
"email": "ada@example.com",
"phone": "+2348012345678",
"name": "Ada Obi"
},
"seller": {
"email": "ada@example.com",
"phone": "+2348012345678",
"name": "Ada Obi"
},
"release": {
"method": "buyer_confirms",
"auto_release_hours": null
},
"commission": {
"rate_bps": 1000,
"min_amount": 45000000,
"max_amount": 45000000
},
"escrow_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"return_url": "<string>",
"cancel_url": "<string>",
"external_reference": "proj_4471",
"metadata": {
"project_id": "4471"
},
"expires_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"url_on_platform": "<string>",
"completed_at": "2023-11-07T05:31:56Z",
"cancelled_at": "2023-11-07T05:31:56Z"
},
"milestone_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"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"
}
}Events
Get an event
GET
/
events
/
{id}
Get an event
curl --request GET \
--url https://api.ketapay.com/v1/events/{id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.ketapay.com/v1/events/{id}', 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/events/{id}",
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;
}{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"object": "event",
"type": "checkout_session.expired",
"api_version": "v1",
"livemode": true,
"created_at": "2023-11-07T05:31:56Z",
"data": {
"object": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"object": "checkout_session",
"livemode": true,
"status": "open",
"url": "https://app.ketapay.com/checkout/2c9a7f4e-1b3d-4e6a-8f2c-5d7b9e1a3c60",
"amount": 45000000,
"currency": "NGN",
"fees": {
"amount": 45000000,
"buyer_fee": 2250000,
"buyer_vat": 168750,
"buyer_total": 152418750,
"seller_fee": 2250000,
"commission": 15000000,
"seller_payout": 132750000
},
"category": "other",
"title": "<string>",
"description": "<string>",
"images": [
{
"file": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"url": "<string>",
"thumbnail_url": "<string>",
"alt": "<string>"
}
],
"attachments": [
{
"file": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Project brief.pdf",
"url": "<string>"
}
],
"milestones": [
{
"title": "Design",
"amount": 45000000,
"description": "<string>",
"due_date": "2023-12-25"
}
],
"buyer": {
"email": "ada@example.com",
"phone": "+2348012345678",
"name": "Ada Obi"
},
"seller": {
"email": "ada@example.com",
"phone": "+2348012345678",
"name": "Ada Obi"
},
"release": {
"method": "buyer_confirms",
"auto_release_hours": null
},
"commission": {
"rate_bps": 1000,
"min_amount": 45000000,
"max_amount": 45000000
},
"escrow_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"return_url": "<string>",
"cancel_url": "<string>",
"external_reference": "proj_4471",
"metadata": {
"project_id": "4471"
},
"expires_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"url_on_platform": "<string>",
"completed_at": "2023-11-07T05:31:56Z",
"cancelled_at": "2023-11-07T05:31:56Z"
},
"milestone_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"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
Response
The event
Deduplicate on this
Allowed value:
"event"New event types may be added. Ignore types you don't handle.
Available options:
checkout_session.expired, escrow.funded, milestone.delivered, milestone.released, escrow.completed, escrow.refunded, dispute.opened, dispute.evidence_requested, dispute.evidence_submitted, dispute.resolved, payout.sent, refund.sent, refund.failed, chargeback.opened, chargeback.closed, payout.failed Allowed value:
"v1"Show child attributes
Show child attributes
⌘I