Lister les événements
curl --request GET \
--url https://mercy-pay.com/api/v1/events \
--header 'Authorization: Bearer <token>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://mercy-pay.com/api/v1/events",
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', 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"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"object": "list",
"url": "/api/v1/events",
"has_more": true,
"next_cursor": "evt_01JC9A2B3C4D5E6F7G8H9J0K1M",
"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": "validation_failed",
"message": "Le champ amount est obligatoire.",
"param": "amount",
"doc_url": "https://docs.mercy-pay.com/developers/errors#validation_failed",
"request_id": "req_01jc8x4m2v7t9qk3n5w6y8z0ab",
"errors": {
"amount": [
"Le champ amount est obligatoire."
]
}
}
}{
"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"
}
}Lister les événements
Tous les événements du compte, plus récents en premier : de quoi rattraper ceux qu’un serveur indisponible a manqués.
GET
/
api
/
v1
/
events
Lister les événements
curl --request GET \
--url https://mercy-pay.com/api/v1/events \
--header 'Authorization: Bearer <token>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://mercy-pay.com/api/v1/events",
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', 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"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"object": "list",
"url": "/api/v1/events",
"has_more": true,
"next_cursor": "evt_01JC9A2B3C4D5E6F7G8H9J0K1M",
"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": "validation_failed",
"message": "Le champ amount est obligatoire.",
"param": "amount",
"doc_url": "https://docs.mercy-pay.com/developers/errors#validation_failed",
"request_id": "req_01jc8x4m2v7t9qk3n5w6y8z0ab",
"errors": {
"amount": [
"Le champ amount est obligatoire."
]
}
}
}{
"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
Query Parameters
Response
Une page d'événements