curl --request POST \
--url https://api.kemypay.com/v1/mobile-money/collections \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"service": "019a8f2e-4c1b-7d3a-9e55-2b6f0c1d8a47",
"amount": "1000",
"currency": "XAF",
"phone_number": "237670000000",
"reference": "order-2026-10-29-0001",
"country": "CMR",
"operator": "MTN_CMR",
"description": "Afroyamo Premium",
"metadata": {
"user_id": "42"
},
"webhook_url": "<string>",
"callback_url": "<string>"
}
'import requests
url = "https://api.kemypay.com/v1/mobile-money/collections"
payload = {
"service": "019a8f2e-4c1b-7d3a-9e55-2b6f0c1d8a47",
"amount": "1000",
"currency": "XAF",
"phone_number": "237670000000",
"reference": "order-2026-10-29-0001",
"country": "CMR",
"operator": "MTN_CMR",
"description": "Afroyamo Premium",
"metadata": { "user_id": "42" },
"webhook_url": "<string>",
"callback_url": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
service: '019a8f2e-4c1b-7d3a-9e55-2b6f0c1d8a47',
amount: '1000',
currency: 'XAF',
phone_number: '237670000000',
reference: 'order-2026-10-29-0001',
country: 'CMR',
operator: 'MTN_CMR',
description: 'Afroyamo Premium',
metadata: {user_id: '42'},
webhook_url: '<string>',
callback_url: '<string>'
})
};
fetch('https://api.kemypay.com/v1/mobile-money/collections', 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/collections",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'service' => '019a8f2e-4c1b-7d3a-9e55-2b6f0c1d8a47',
'amount' => '1000',
'currency' => 'XAF',
'phone_number' => '237670000000',
'reference' => 'order-2026-10-29-0001',
'country' => 'CMR',
'operator' => 'MTN_CMR',
'description' => 'Afroyamo Premium',
'metadata' => [
'user_id' => '42'
],
'webhook_url' => '<string>',
'callback_url' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.kemypay.com/v1/mobile-money/collections"
payload := strings.NewReader("{\n \"service\": \"019a8f2e-4c1b-7d3a-9e55-2b6f0c1d8a47\",\n \"amount\": \"1000\",\n \"currency\": \"XAF\",\n \"phone_number\": \"237670000000\",\n \"reference\": \"order-2026-10-29-0001\",\n \"country\": \"CMR\",\n \"operator\": \"MTN_CMR\",\n \"description\": \"Afroyamo Premium\",\n \"metadata\": {\n \"user_id\": \"42\"\n },\n \"webhook_url\": \"<string>\",\n \"callback_url\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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/collections")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"service\": \"019a8f2e-4c1b-7d3a-9e55-2b6f0c1d8a47\",\n \"amount\": \"1000\",\n \"currency\": \"XAF\",\n \"phone_number\": \"237670000000\",\n \"reference\": \"order-2026-10-29-0001\",\n \"country\": \"CMR\",\n \"operator\": \"MTN_CMR\",\n \"description\": \"Afroyamo Premium\",\n \"metadata\": {\n \"user_id\": \"42\"\n },\n \"webhook_url\": \"<string>\",\n \"callback_url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kemypay.com/v1/mobile-money/collections")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"service\": \"019a8f2e-4c1b-7d3a-9e55-2b6f0c1d8a47\",\n \"amount\": \"1000\",\n \"currency\": \"XAF\",\n \"phone_number\": \"237670000000\",\n \"reference\": \"order-2026-10-29-0001\",\n \"country\": \"CMR\",\n \"operator\": \"MTN_CMR\",\n \"description\": \"Afroyamo Premium\",\n \"metadata\": {\n \"user_id\": \"42\"\n },\n \"webhook_url\": \"<string>\",\n \"callback_url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"code": "019a9c41-7e2d-4b8f-a1c3-5d6e7f8a9b0c",
"reference": "order-2026-10-29-0001",
"service_code": "019a8f2e-4c1b-7d3a-9e55-2b6f0c1d8a47",
"status": "processing",
"country": "CMR",
"operator": "MTN_CMR",
"phone_number": "237670000000",
"currency": "XAF",
"value": "1000.00",
"amount": "1033.00",
"fee": "33.00",
"fee_bearer": "customer",
"net_amount": "1000.00",
"description": "Afroyamo Premium",
"metadata": {
"user_id": "42"
},
"failure_code": null,
"failure_message": null,
"operator_transaction_id": null,
"callback_url": "https://afroyamo.com/payment/done",
"created_at": "2026-10-29T10:00:00+00:00",
"completed_at": null
},
"meta": {
"request_id": "a4f8e2c1b3d97056",
"timestamp": "2026-10-29T10:00:00+00:00",
"mode": "live"
}
}{
"success": true,
"data": {
"code": "019a9c41-7e2d-4b8f-a1c3-5d6e7f8a9b0c",
"reference": "order-2026-10-29-0001",
"service_code": "019a8f2e-4c1b-7d3a-9e55-2b6f0c1d8a47",
"status": "processing",
"country": "CMR",
"operator": "MTN_CMR",
"phone_number": "237670000000",
"currency": "XAF",
"value": "1000.00",
"amount": "1033.00",
"fee": "33.00",
"fee_bearer": "customer",
"net_amount": "1000.00",
"description": "Afroyamo Premium",
"metadata": {
"user_id": "42"
},
"failure_code": null,
"failure_message": null,
"operator_transaction_id": null,
"callback_url": "https://afroyamo.com/payment/done",
"created_at": "2026-10-29T10:00:00+00:00",
"completed_at": null
},
"meta": {
"request_id": "a4f8e2c1b3d97056",
"timestamp": "2026-10-29T10:00:00+00:00",
"mode": "live"
}
}{
"success": false,
"error": {
"code": "FORBIDDEN",
"message": "The service is pending_review: it cannot collect payments in live mode.",
"details": {
"service_status": "pending_review"
}
},
"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"
}
}{
"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"
}
}{
"success": false,
"error": {
"code": "OPERATION_FAILED",
"message": "ORANGE_CMR is temporarily unavailable for collections. Offer another operator or try again later.",
"details": {
"failure_code": "operator_unavailable"
}
},
"meta": {
"request_id": "a4f8e2c1b3d97056",
"timestamp": "2026-10-29T10:00:00+00:00",
"mode": "live"
}
}Demander un paiement
Demande à votre client de payer depuis son compte mobile money : il reçoit une demande sur son téléphone et confirme
avec son code PIN. Le résultat arrive par webhook (mobile_money.collection.completed ou .failed).
referenceest votre référence unique. Renvoyer la même demande renvoie le même paiement avec200: votre client n’est jamais débité deux fois. La même référence avec un autre service, montant ou numéro est refusée.webhook_urletcallback_urlenvoyées ici l’emportent sur celles du service.- Renvoie
201avec le statutprocessing(oupendingsi l’opérateur n’a pas encore répondu : nous vérifions pour vous). - En mode test, le résultat est immédiat (voir Mode test).
curl --request POST \
--url https://api.kemypay.com/v1/mobile-money/collections \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"service": "019a8f2e-4c1b-7d3a-9e55-2b6f0c1d8a47",
"amount": "1000",
"currency": "XAF",
"phone_number": "237670000000",
"reference": "order-2026-10-29-0001",
"country": "CMR",
"operator": "MTN_CMR",
"description": "Afroyamo Premium",
"metadata": {
"user_id": "42"
},
"webhook_url": "<string>",
"callback_url": "<string>"
}
'import requests
url = "https://api.kemypay.com/v1/mobile-money/collections"
payload = {
"service": "019a8f2e-4c1b-7d3a-9e55-2b6f0c1d8a47",
"amount": "1000",
"currency": "XAF",
"phone_number": "237670000000",
"reference": "order-2026-10-29-0001",
"country": "CMR",
"operator": "MTN_CMR",
"description": "Afroyamo Premium",
"metadata": { "user_id": "42" },
"webhook_url": "<string>",
"callback_url": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
service: '019a8f2e-4c1b-7d3a-9e55-2b6f0c1d8a47',
amount: '1000',
currency: 'XAF',
phone_number: '237670000000',
reference: 'order-2026-10-29-0001',
country: 'CMR',
operator: 'MTN_CMR',
description: 'Afroyamo Premium',
metadata: {user_id: '42'},
webhook_url: '<string>',
callback_url: '<string>'
})
};
fetch('https://api.kemypay.com/v1/mobile-money/collections', 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/collections",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'service' => '019a8f2e-4c1b-7d3a-9e55-2b6f0c1d8a47',
'amount' => '1000',
'currency' => 'XAF',
'phone_number' => '237670000000',
'reference' => 'order-2026-10-29-0001',
'country' => 'CMR',
'operator' => 'MTN_CMR',
'description' => 'Afroyamo Premium',
'metadata' => [
'user_id' => '42'
],
'webhook_url' => '<string>',
'callback_url' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.kemypay.com/v1/mobile-money/collections"
payload := strings.NewReader("{\n \"service\": \"019a8f2e-4c1b-7d3a-9e55-2b6f0c1d8a47\",\n \"amount\": \"1000\",\n \"currency\": \"XAF\",\n \"phone_number\": \"237670000000\",\n \"reference\": \"order-2026-10-29-0001\",\n \"country\": \"CMR\",\n \"operator\": \"MTN_CMR\",\n \"description\": \"Afroyamo Premium\",\n \"metadata\": {\n \"user_id\": \"42\"\n },\n \"webhook_url\": \"<string>\",\n \"callback_url\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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/collections")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"service\": \"019a8f2e-4c1b-7d3a-9e55-2b6f0c1d8a47\",\n \"amount\": \"1000\",\n \"currency\": \"XAF\",\n \"phone_number\": \"237670000000\",\n \"reference\": \"order-2026-10-29-0001\",\n \"country\": \"CMR\",\n \"operator\": \"MTN_CMR\",\n \"description\": \"Afroyamo Premium\",\n \"metadata\": {\n \"user_id\": \"42\"\n },\n \"webhook_url\": \"<string>\",\n \"callback_url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kemypay.com/v1/mobile-money/collections")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"service\": \"019a8f2e-4c1b-7d3a-9e55-2b6f0c1d8a47\",\n \"amount\": \"1000\",\n \"currency\": \"XAF\",\n \"phone_number\": \"237670000000\",\n \"reference\": \"order-2026-10-29-0001\",\n \"country\": \"CMR\",\n \"operator\": \"MTN_CMR\",\n \"description\": \"Afroyamo Premium\",\n \"metadata\": {\n \"user_id\": \"42\"\n },\n \"webhook_url\": \"<string>\",\n \"callback_url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"code": "019a9c41-7e2d-4b8f-a1c3-5d6e7f8a9b0c",
"reference": "order-2026-10-29-0001",
"service_code": "019a8f2e-4c1b-7d3a-9e55-2b6f0c1d8a47",
"status": "processing",
"country": "CMR",
"operator": "MTN_CMR",
"phone_number": "237670000000",
"currency": "XAF",
"value": "1000.00",
"amount": "1033.00",
"fee": "33.00",
"fee_bearer": "customer",
"net_amount": "1000.00",
"description": "Afroyamo Premium",
"metadata": {
"user_id": "42"
},
"failure_code": null,
"failure_message": null,
"operator_transaction_id": null,
"callback_url": "https://afroyamo.com/payment/done",
"created_at": "2026-10-29T10:00:00+00:00",
"completed_at": null
},
"meta": {
"request_id": "a4f8e2c1b3d97056",
"timestamp": "2026-10-29T10:00:00+00:00",
"mode": "live"
}
}{
"success": true,
"data": {
"code": "019a9c41-7e2d-4b8f-a1c3-5d6e7f8a9b0c",
"reference": "order-2026-10-29-0001",
"service_code": "019a8f2e-4c1b-7d3a-9e55-2b6f0c1d8a47",
"status": "processing",
"country": "CMR",
"operator": "MTN_CMR",
"phone_number": "237670000000",
"currency": "XAF",
"value": "1000.00",
"amount": "1033.00",
"fee": "33.00",
"fee_bearer": "customer",
"net_amount": "1000.00",
"description": "Afroyamo Premium",
"metadata": {
"user_id": "42"
},
"failure_code": null,
"failure_message": null,
"operator_transaction_id": null,
"callback_url": "https://afroyamo.com/payment/done",
"created_at": "2026-10-29T10:00:00+00:00",
"completed_at": null
},
"meta": {
"request_id": "a4f8e2c1b3d97056",
"timestamp": "2026-10-29T10:00:00+00:00",
"mode": "live"
}
}{
"success": false,
"error": {
"code": "FORBIDDEN",
"message": "The service is pending_review: it cannot collect payments in live mode.",
"details": {
"service_status": "pending_review"
}
},
"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"
}
}{
"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"
}
}{
"success": false,
"error": {
"code": "OPERATION_FAILED",
"message": "ORANGE_CMR is temporarily unavailable for collections. Offer another operator or try again later.",
"details": {
"failure_code": "operator_unavailable"
}
},
"meta": {
"request_id": "a4f8e2c1b3d97056",
"timestamp": "2026-10-29T10:00:00+00:00",
"mode": "live"
}
}Autorisations
Votre clé API secrète : sk_live_… (argent réel) ou sk_test_… (mode test).
Corps
Le code du service qui encaisse.
"019a8f2e-4c1b-7d3a-9e55-2b6f0c1d8a47"
La valeur de la marchandise, en chaîne. Respectez les decimals de l'opérateur.
"1000"
"XAF"
Numéro mobile money avec l'indicatif du pays. Les espaces, tirets et + sont retirés.
"237670000000"
Votre propre référence unique (1 à 100 lettres, chiffres, . _ : -). Permet de renvoyer l'appel sans risque.
"order-2026-10-29-0001"
Vérification facultative. Refusé si l'opérateur est dans un autre pays.
"CMR"
Code de l'opérateur (MTN_CMR). Facultatif — deviné à partir du numéro s'il manque.
"MTN_CMR"
Par défaut : le réglage du service.
merchant, customer Affiché à votre client sur la demande de paiement. 4 à 22 lettres, chiffres ou espaces.
"Afroyamo Premium"
Jusqu'à 10 clés avec des valeurs texte. Renvoyées dans les webhooks.
Show child attributes
Show child attributes
{ "user_id": "42" }
https. L'emporte sur la webhook_url du service pour ce paiement.
L'emporte sur la callback_url du service pour ce paiement.