Renouveler le secret des webhooks
curl --request POST \
--url https://api.kemypay.com/v1/mobile-money/services/{code}/rotate-secret \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.kemypay.com/v1/mobile-money/services/{code}/rotate-secret"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.kemypay.com/v1/mobile-money/services/{code}/rotate-secret', 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.kemypay.com/v1/mobile-money/services/{code}/rotate-secret",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.kemypay.com/v1/mobile-money/services/{code}/rotate-secret"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.kemypay.com/v1/mobile-money/services/{code}/rotate-secret")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kemypay.com/v1/mobile-money/services/{code}/rotate-secret")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"code": "019a8f2e-4c1b-7d3a-9e55-2b6f0c1d8a47",
"name": "Afroyamo",
"category": {
"code": "dating",
"name": "Dating & social apps"
},
"description": "Dating app for the African diaspora. Premium subscriptions paid by mobile money.",
"url": "https://afroyamo.com",
"support_email": "support@afroyamo.com",
"support_phone": "+237670000000",
"status": "pending_review",
"fee_bearer": "merchant",
"webhook_url": "https://api.afroyamo.com/kemypay/webhooks",
"callback_url": null,
"review_reason": null,
"created_at": "2026-10-29T10:00:00+00:00",
"reviewed_at": null,
"webhook_secret": "whsec_5f2c0a9e7b1d4c3a8e6f0b2d9c7a1e4f5b8d3c6a9e2f1b4d7c0a3e6f9b2d5c8a"
},
"meta": {
"request_id": "a4f8e2c1b3d97056",
"timestamp": "2026-10-29T10:00:00+00:00",
"mode": "live"
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Some fields of the payment are missing or invalid.",
"details": {
"phone_number": "Required: the mobile money number with the country code, digits only, for example 237670000000."
}
},
"meta": {
"request_id": "a4f8e2c1b3d97056",
"timestamp": "2026-10-29T10:00:00+00:00",
"mode": "live"
}
}Services
Rotate the Webhook Secret
Creates a new webhook_secret for the service and returns it once. The previous secret stops working
immediately: update your server before you rotate in production.
POST
/
mobile-money
/
services
/
{code}
/
rotate-secret
Renouveler le secret des webhooks
curl --request POST \
--url https://api.kemypay.com/v1/mobile-money/services/{code}/rotate-secret \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.kemypay.com/v1/mobile-money/services/{code}/rotate-secret"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.kemypay.com/v1/mobile-money/services/{code}/rotate-secret', 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.kemypay.com/v1/mobile-money/services/{code}/rotate-secret",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.kemypay.com/v1/mobile-money/services/{code}/rotate-secret"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.kemypay.com/v1/mobile-money/services/{code}/rotate-secret")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kemypay.com/v1/mobile-money/services/{code}/rotate-secret")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"code": "019a8f2e-4c1b-7d3a-9e55-2b6f0c1d8a47",
"name": "Afroyamo",
"category": {
"code": "dating",
"name": "Dating & social apps"
},
"description": "Dating app for the African diaspora. Premium subscriptions paid by mobile money.",
"url": "https://afroyamo.com",
"support_email": "support@afroyamo.com",
"support_phone": "+237670000000",
"status": "pending_review",
"fee_bearer": "merchant",
"webhook_url": "https://api.afroyamo.com/kemypay/webhooks",
"callback_url": null,
"review_reason": null,
"created_at": "2026-10-29T10:00:00+00:00",
"reviewed_at": null,
"webhook_secret": "whsec_5f2c0a9e7b1d4c3a8e6f0b2d9c7a1e4f5b8d3c6a9e2f1b4d7c0a3e6f9b2d5c8a"
},
"meta": {
"request_id": "a4f8e2c1b3d97056",
"timestamp": "2026-10-29T10:00:00+00:00",
"mode": "live"
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Some fields of the payment are missing or invalid.",
"details": {
"phone_number": "Required: the mobile money number with the country code, digits only, for example 237670000000."
}
},
"meta": {
"request_id": "a4f8e2c1b3d97056",
"timestamp": "2026-10-29T10:00:00+00:00",
"mode": "live"
}
}Authorizations
Votre clé API secrète : sk_live_… (argent réel) ou sk_test_… (mode test).
Path Parameters
Le code du service.