Initier un payout
curl --request POST \
--url https://api.saspay.me/api/v1/payouts/initialize/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": "10000.00",
"currency": "XAF",
"country": "CM",
"customer": {
"phone": "+237677889900"
},
"method": "mtn_cm",
"recipient": {
"msisdn": "677889900"
},
"description": "Remboursement commande #778"
}
'import requests
url = "https://api.saspay.me/api/v1/payouts/initialize/"
payload = {
"amount": "10000.00",
"currency": "XAF",
"country": "CM",
"customer": { "phone": "+237677889900" },
"method": "mtn_cm",
"recipient": { "msisdn": "677889900" },
"description": "Remboursement commande #778"
}
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({
amount: '10000.00',
currency: 'XAF',
country: 'CM',
customer: {phone: '+237677889900'},
method: 'mtn_cm',
recipient: {msisdn: '677889900'},
description: 'Remboursement commande #778'
})
};
fetch('https://api.saspay.me/api/v1/payouts/initialize/', 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.saspay.me/api/v1/payouts/initialize/",
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([
'amount' => '10000.00',
'currency' => 'XAF',
'country' => 'CM',
'customer' => [
'phone' => '+237677889900'
],
'method' => 'mtn_cm',
'recipient' => [
'msisdn' => '677889900'
],
'description' => 'Remboursement commande #778'
]),
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.saspay.me/api/v1/payouts/initialize/"
payload := strings.NewReader("{\n \"amount\": \"10000.00\",\n \"currency\": \"XAF\",\n \"country\": \"CM\",\n \"customer\": {\n \"phone\": \"+237677889900\"\n },\n \"method\": \"mtn_cm\",\n \"recipient\": {\n \"msisdn\": \"677889900\"\n },\n \"description\": \"Remboursement commande #778\"\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.saspay.me/api/v1/payouts/initialize/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": \"10000.00\",\n \"currency\": \"XAF\",\n \"country\": \"CM\",\n \"customer\": {\n \"phone\": \"+237677889900\"\n },\n \"method\": \"mtn_cm\",\n \"recipient\": {\n \"msisdn\": \"677889900\"\n },\n \"description\": \"Remboursement commande #778\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.saspay.me/api/v1/payouts/initialize/")
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 \"amount\": \"10000.00\",\n \"currency\": \"XAF\",\n \"country\": \"CM\",\n \"customer\": {\n \"phone\": \"+237677889900\"\n },\n \"method\": \"mtn_cm\",\n \"recipient\": {\n \"msisdn\": \"677889900\"\n },\n \"description\": \"Remboursement commande #778\"\n}"
response = http.request(request)
puts response.read_body{
"message": "Payout transaction initialized successfully",
"id": "a4b5c6d7-e8f9-4a0b-8c1d-2e3f4a5b6c7d"
}{
"message": "IP non autorisée pour les payouts — ajoutez l'IP de votre serveur à la whitelist IP de votre marchand.",
"code": "ip_not_whitelisted"
}{
"message": "La devise XOF ne correspond pas au pays CM.",
"code": "currency_country_mismatch"
}Retraits
Initier un payout
Envoie des fonds depuis votre solde marchand vers un bénéficiaire mobile money
POST
/
payouts
/
initialize
/
Initier un payout
curl --request POST \
--url https://api.saspay.me/api/v1/payouts/initialize/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": "10000.00",
"currency": "XAF",
"country": "CM",
"customer": {
"phone": "+237677889900"
},
"method": "mtn_cm",
"recipient": {
"msisdn": "677889900"
},
"description": "Remboursement commande #778"
}
'import requests
url = "https://api.saspay.me/api/v1/payouts/initialize/"
payload = {
"amount": "10000.00",
"currency": "XAF",
"country": "CM",
"customer": { "phone": "+237677889900" },
"method": "mtn_cm",
"recipient": { "msisdn": "677889900" },
"description": "Remboursement commande #778"
}
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({
amount: '10000.00',
currency: 'XAF',
country: 'CM',
customer: {phone: '+237677889900'},
method: 'mtn_cm',
recipient: {msisdn: '677889900'},
description: 'Remboursement commande #778'
})
};
fetch('https://api.saspay.me/api/v1/payouts/initialize/', 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.saspay.me/api/v1/payouts/initialize/",
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([
'amount' => '10000.00',
'currency' => 'XAF',
'country' => 'CM',
'customer' => [
'phone' => '+237677889900'
],
'method' => 'mtn_cm',
'recipient' => [
'msisdn' => '677889900'
],
'description' => 'Remboursement commande #778'
]),
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.saspay.me/api/v1/payouts/initialize/"
payload := strings.NewReader("{\n \"amount\": \"10000.00\",\n \"currency\": \"XAF\",\n \"country\": \"CM\",\n \"customer\": {\n \"phone\": \"+237677889900\"\n },\n \"method\": \"mtn_cm\",\n \"recipient\": {\n \"msisdn\": \"677889900\"\n },\n \"description\": \"Remboursement commande #778\"\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.saspay.me/api/v1/payouts/initialize/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": \"10000.00\",\n \"currency\": \"XAF\",\n \"country\": \"CM\",\n \"customer\": {\n \"phone\": \"+237677889900\"\n },\n \"method\": \"mtn_cm\",\n \"recipient\": {\n \"msisdn\": \"677889900\"\n },\n \"description\": \"Remboursement commande #778\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.saspay.me/api/v1/payouts/initialize/")
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 \"amount\": \"10000.00\",\n \"currency\": \"XAF\",\n \"country\": \"CM\",\n \"customer\": {\n \"phone\": \"+237677889900\"\n },\n \"method\": \"mtn_cm\",\n \"recipient\": {\n \"msisdn\": \"677889900\"\n },\n \"description\": \"Remboursement commande #778\"\n}"
response = http.request(request)
puts response.read_body{
"message": "Payout transaction initialized successfully",
"id": "a4b5c6d7-e8f9-4a0b-8c1d-2e3f4a5b6c7d"
}{
"message": "IP non autorisée pour les payouts — ajoutez l'IP de votre serveur à la whitelist IP de votre marchand.",
"code": "ip_not_whitelisted"
}{
"message": "La devise XOF ne correspond pas au pays CM.",
"code": "currency_country_mismatch"
}Whitelist IP obligatoire pour une clé API. Si aucune IP n’est whitelistée pour votre marchand, cet appel échoue avec
403 ip_not_whitelisted, quelle que soit la validité de votre clé. Ajoutez l’IP de votre serveur depuis votre tableau de bord ou l’API de gestion du marchand avant votre premier appel. Ce prérequis ne s’applique pas à un appel authentifié via le dashboard (JWT).Contrairement à l’encaissement, le mismatch entre
currency et country est ici rejeté (422 currency_country_mismatch), sans conversion automatique.Authorizations
Clé API secrète du marchand — header Authorization: Bearer sk_live_xxx (ou sk_test_xxx en environnement de test).
Body
application/json
Example:
"10000.00"
Required string length:
3Example:
"XAF"
Required string length:
2Example:
"CM"
Show child attributes
Show child attributes
Code réseau du bénéficiaire
Example:
"mtn_cm"
Show child attributes
Show child attributes
UUID du marchand visé. Ignoré pour une clé API (toujours vous-même).
Example:
"Remboursement commande #778"
ADD_ON : les frais s'ajoutent au montant débité au client. DEDUCTED : les frais sont déduits du montant net reversé au marchand. Défaut : configuration du marchand.
Available options:
ADD_ON, DEDUCTED Response
Payout initialisé
⌘I