Calculer le prix d'un paiement (bêta)
curl --request POST \
--url https://api.kemypay.com/v1/mobile-money/quote \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"operator": "MTN_CMR",
"currency": "XAF",
"amount": "1000",
"service": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://api.kemypay.com/v1/mobile-money/quote"
payload = {
"operator": "MTN_CMR",
"currency": "XAF",
"amount": "1000",
"service": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
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({
operator: 'MTN_CMR',
currency: 'XAF',
amount: '1000',
service: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://api.kemypay.com/v1/mobile-money/quote', 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/quote",
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([
'operator' => 'MTN_CMR',
'currency' => 'XAF',
'amount' => '1000',
'service' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
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/quote"
payload := strings.NewReader("{\n \"operator\": \"MTN_CMR\",\n \"currency\": \"XAF\",\n \"amount\": \"1000\",\n \"service\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\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/quote")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"operator\": \"MTN_CMR\",\n \"currency\": \"XAF\",\n \"amount\": \"1000\",\n \"service\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kemypay.com/v1/mobile-money/quote")
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 \"operator\": \"MTN_CMR\",\n \"currency\": \"XAF\",\n \"amount\": \"1000\",\n \"service\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"operator": "MTN_CMR",
"country": "CMR",
"currency": "XAF",
"fee_bearer": "customer",
"value": "1000",
"customer_pays": "1033",
"fee": "33",
"merchant_receives": "1000",
"within_limits": true
},
"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"
}
}Encaissements
Calculer le prix d'un paiement
Calcule le prix d’un paiement avant de le demander, à votre prix : ce que paie votre client, les frais et ce que vous recevez, selon qui paie les frais. Rien n’est créé.
POST
/
mobile-money
/
quote
Calculer le prix d'un paiement (bêta)
curl --request POST \
--url https://api.kemypay.com/v1/mobile-money/quote \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"operator": "MTN_CMR",
"currency": "XAF",
"amount": "1000",
"service": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://api.kemypay.com/v1/mobile-money/quote"
payload = {
"operator": "MTN_CMR",
"currency": "XAF",
"amount": "1000",
"service": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
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({
operator: 'MTN_CMR',
currency: 'XAF',
amount: '1000',
service: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://api.kemypay.com/v1/mobile-money/quote', 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/quote",
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([
'operator' => 'MTN_CMR',
'currency' => 'XAF',
'amount' => '1000',
'service' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
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/quote"
payload := strings.NewReader("{\n \"operator\": \"MTN_CMR\",\n \"currency\": \"XAF\",\n \"amount\": \"1000\",\n \"service\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\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/quote")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"operator\": \"MTN_CMR\",\n \"currency\": \"XAF\",\n \"amount\": \"1000\",\n \"service\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kemypay.com/v1/mobile-money/quote")
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 \"operator\": \"MTN_CMR\",\n \"currency\": \"XAF\",\n \"amount\": \"1000\",\n \"service\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"operator": "MTN_CMR",
"country": "CMR",
"currency": "XAF",
"fee_bearer": "customer",
"value": "1000",
"customer_pays": "1033",
"fee": "33",
"merchant_receives": "1000",
"within_limits": true
},
"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"
}
}Bêta. Ce point d’entrée est en cours de déploiement en production. Bientôt disponible en production : vous pouvez déjà préparer votre intégration avec cette page.
Autorisations
Votre clé API secrète : sk_live_… (argent réel) ou sk_test_… (mode test).
Corps
application/json
Exemple:
"MTN_CMR"
Exemple:
"XAF"
La valeur de la marchandise.
Exemple:
"1000"
Par défaut : le réglage du service, sinon merchant.
Options disponibles:
merchant, customer Facultatif. Utilise le fee_bearer de ce service.