Lire un événement
curl --request GET \
--url https://mercy-pay.com/api/v1/events/{id} \
--header 'Authorization: Bearer <token>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://mercy-pay.com/api/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;
}const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://mercy-pay.com/api/v1/events/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://mercy-pay.com/api/v1/events/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": {
"id": "evt_01JC9A2B3C4D5E6F7G8H9J0K1M",
"object": "event",
"livemode": false,
"created": "2026-11-08T10:42:17+00:00",
"type": "payment.succeeded",
"data": {
"id": "pay_5e0c8a7b3d1f4a2e9c648b7f0d2e1a93",
"object": "payment",
"livemode": false,
"created": "2026-10-04T10:20:00+00:00",
"checkout_session": null,
"amount": 1000,
"fee_amount": 50,
"net_amount": 950,
"currency": "XAF",
"payment_method": "mobile_money",
"mobile_money_country": "CMR",
"mobile_money_provider": "MTN_MOMO_CMR",
"status": "succeeded",
"failure_code": null,
"failure_reason": null,
"metadata": null,
"next_action": null
}
}
}{
"error": {
"type": "authentication_error",
"code": "api_key_invalid",
"message": "Clé API invalide.",
"param": null,
"doc_url": "https://docs.mercy-pay.com/developers/errors#api_key_invalid",
"request_id": "req_01jc8x4m2v7t9qk3n5w6y8z0ab"
}
}{
"error": {
"type": "invalid_request_error",
"code": "resource_not_found",
"message": "Ressource introuvable.",
"param": null,
"doc_url": "https://docs.mercy-pay.com/developers/errors#resource_not_found",
"request_id": "req_01jc8x4m2v7t9qk3n5w6y8z0ab"
}
}{
"error": {
"type": "rate_limit_error",
"code": "rate_limited",
"message": "Trop de requêtes.",
"param": null,
"doc_url": "https://docs.mercy-pay.com/developers/errors#rate_limited",
"request_id": "req_01jc8x4m2v7t9qk3n5w6y8z0ab"
}
}Lire un événement
GET
/
api
/
v1
/
events
/
{id}
Lire un événement
curl --request GET \
--url https://mercy-pay.com/api/v1/events/{id} \
--header 'Authorization: Bearer <token>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://mercy-pay.com/api/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;
}const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://mercy-pay.com/api/v1/events/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://mercy-pay.com/api/v1/events/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": {
"id": "evt_01JC9A2B3C4D5E6F7G8H9J0K1M",
"object": "event",
"livemode": false,
"created": "2026-11-08T10:42:17+00:00",
"type": "payment.succeeded",
"data": {
"id": "pay_5e0c8a7b3d1f4a2e9c648b7f0d2e1a93",
"object": "payment",
"livemode": false,
"created": "2026-10-04T10:20:00+00:00",
"checkout_session": null,
"amount": 1000,
"fee_amount": 50,
"net_amount": 950,
"currency": "XAF",
"payment_method": "mobile_money",
"mobile_money_country": "CMR",
"mobile_money_provider": "MTN_MOMO_CMR",
"status": "succeeded",
"failure_code": null,
"failure_reason": null,
"metadata": null,
"next_action": null
}
}
}{
"error": {
"type": "authentication_error",
"code": "api_key_invalid",
"message": "Clé API invalide.",
"param": null,
"doc_url": "https://docs.mercy-pay.com/developers/errors#api_key_invalid",
"request_id": "req_01jc8x4m2v7t9qk3n5w6y8z0ab"
}
}{
"error": {
"type": "invalid_request_error",
"code": "resource_not_found",
"message": "Ressource introuvable.",
"param": null,
"doc_url": "https://docs.mercy-pay.com/developers/errors#resource_not_found",
"request_id": "req_01jc8x4m2v7t9qk3n5w6y8z0ab"
}
}{
"error": {
"type": "rate_limit_error",
"code": "rate_limited",
"message": "Trop de requêtes.",
"param": null,
"doc_url": "https://docs.mercy-pay.com/developers/errors#rate_limited",
"request_id": "req_01jc8x4m2v7t9qk3n5w6y8z0ab"
}
}Authorizations
Response
L'événement