Créer un payout mobile money direct
curl --request POST \
--url https://app.ligdicash.com/pay/v01/straight/payout \
--header 'Accept: <accept>' \
--header 'Apikey: <apikey>' \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"commande": {
"amount": 123,
"description": "<string>",
"customer": "<string>",
"callback_url": "<string>",
"custom_data": {}
}
}
'import requests
url = "https://app.ligdicash.com/pay/v01/straight/payout"
payload = { "commande": {
"amount": 123,
"description": "<string>",
"customer": "<string>",
"callback_url": "<string>",
"custom_data": {}
} }
headers = {
"Apikey": "<apikey>",
"Authorization": "<authorization>",
"Accept": "<accept>",
"Content-Type": "<content-type>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Apikey: '<apikey>',
Authorization: '<authorization>',
Accept: '<accept>',
'Content-Type': '<content-type>'
},
body: JSON.stringify({
commande: {
amount: 123,
description: '<string>',
customer: '<string>',
callback_url: '<string>',
custom_data: {}
}
})
};
fetch('https://app.ligdicash.com/pay/v01/straight/payout', 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://app.ligdicash.com/pay/v01/straight/payout",
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([
'commande' => [
'amount' => 123,
'description' => '<string>',
'customer' => '<string>',
'callback_url' => '<string>',
'custom_data' => [
]
]
]),
CURLOPT_HTTPHEADER => [
"Accept: <accept>",
"Apikey: <apikey>",
"Authorization: <authorization>",
"Content-Type: <content-type>"
],
]);
$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://app.ligdicash.com/pay/v01/straight/payout"
payload := strings.NewReader("{\n \"commande\": {\n \"amount\": 123,\n \"description\": \"<string>\",\n \"customer\": \"<string>\",\n \"callback_url\": \"<string>\",\n \"custom_data\": {}\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Apikey", "<apikey>")
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Accept", "<accept>")
req.Header.Add("Content-Type", "<content-type>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.ligdicash.com/pay/v01/straight/payout")
.header("Apikey", "<apikey>")
.header("Authorization", "<authorization>")
.header("Accept", "<accept>")
.header("Content-Type", "<content-type>")
.body("{\n \"commande\": {\n \"amount\": 123,\n \"description\": \"<string>\",\n \"customer\": \"<string>\",\n \"callback_url\": \"<string>\",\n \"custom_data\": {}\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.ligdicash.com/pay/v01/straight/payout")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Apikey"] = '<apikey>'
request["Authorization"] = '<authorization>'
request["Accept"] = '<accept>'
request["Content-Type"] = '<content-type>'
request.body = "{\n \"commande\": {\n \"amount\": 123,\n \"description\": \"<string>\",\n \"customer\": \"<string>\",\n \"callback_url\": \"<string>\",\n \"custom_data\": {}\n }\n}"
response = http.request(request)
puts response.read_body{
"response_code": "<string>",
"token": "<string>",
"response_text": "<string>",
"description": "<string>",
"custom_data": "<string>",
"wiki": "<string>"
}Endpoints — Payout
Créer un payout mobile money direct
Transfère des fonds directement vers un numéro mobile money, sans compte LigdiCash intermédiaire.
POST
/
pay
/
v01
/
straight
/
payout
Créer un payout mobile money direct
curl --request POST \
--url https://app.ligdicash.com/pay/v01/straight/payout \
--header 'Accept: <accept>' \
--header 'Apikey: <apikey>' \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"commande": {
"amount": 123,
"description": "<string>",
"customer": "<string>",
"callback_url": "<string>",
"custom_data": {}
}
}
'import requests
url = "https://app.ligdicash.com/pay/v01/straight/payout"
payload = { "commande": {
"amount": 123,
"description": "<string>",
"customer": "<string>",
"callback_url": "<string>",
"custom_data": {}
} }
headers = {
"Apikey": "<apikey>",
"Authorization": "<authorization>",
"Accept": "<accept>",
"Content-Type": "<content-type>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Apikey: '<apikey>',
Authorization: '<authorization>',
Accept: '<accept>',
'Content-Type': '<content-type>'
},
body: JSON.stringify({
commande: {
amount: 123,
description: '<string>',
customer: '<string>',
callback_url: '<string>',
custom_data: {}
}
})
};
fetch('https://app.ligdicash.com/pay/v01/straight/payout', 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://app.ligdicash.com/pay/v01/straight/payout",
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([
'commande' => [
'amount' => 123,
'description' => '<string>',
'customer' => '<string>',
'callback_url' => '<string>',
'custom_data' => [
]
]
]),
CURLOPT_HTTPHEADER => [
"Accept: <accept>",
"Apikey: <apikey>",
"Authorization: <authorization>",
"Content-Type: <content-type>"
],
]);
$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://app.ligdicash.com/pay/v01/straight/payout"
payload := strings.NewReader("{\n \"commande\": {\n \"amount\": 123,\n \"description\": \"<string>\",\n \"customer\": \"<string>\",\n \"callback_url\": \"<string>\",\n \"custom_data\": {}\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Apikey", "<apikey>")
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Accept", "<accept>")
req.Header.Add("Content-Type", "<content-type>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.ligdicash.com/pay/v01/straight/payout")
.header("Apikey", "<apikey>")
.header("Authorization", "<authorization>")
.header("Accept", "<accept>")
.header("Content-Type", "<content-type>")
.body("{\n \"commande\": {\n \"amount\": 123,\n \"description\": \"<string>\",\n \"customer\": \"<string>\",\n \"callback_url\": \"<string>\",\n \"custom_data\": {}\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.ligdicash.com/pay/v01/straight/payout")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Apikey"] = '<apikey>'
request["Authorization"] = '<authorization>'
request["Accept"] = '<accept>'
request["Content-Type"] = '<content-type>'
request.body = "{\n \"commande\": {\n \"amount\": 123,\n \"description\": \"<string>\",\n \"customer\": \"<string>\",\n \"callback_url\": \"<string>\",\n \"custom_data\": {}\n }\n}"
response = http.request(request)
puts response.read_body{
"response_code": "<string>",
"token": "<string>",
"response_text": "<string>",
"description": "<string>",
"custom_data": "<string>",
"wiki": "<string>"
}Cette méthode n’est pas instantanée. Le délai peut aller de quelques secondes à plusieurs jours selon l’opérateur. Pour un crédit instantané vers un wallet LigdiCash, utilisez POST /pay/v01/withdrawal/create.
En-têtes
Clé API du projet LigdiCash.
Bearer {API_TOKEN}application/jsonapplication/jsonCorps
Masquer commande
Masquer commande
Montant en XOF (entier positif).
Description de l’opération.
Numéro mobile money du bénéficiaire. Format : indicatif + numéro, sans
+ ni espaces. Exemple : 22670000000.URL HTTPS de notification. Doit être accessible publiquement.
Métadonnées libres. Recommandé : inclure un
transaction_id unique.Réponse
"00" = payout initié, autre valeur = erreur.Token du payout. À stocker — requis pour vérifier le statut.
Message associé. Peut être vide.
Description complémentaire. Peut être vide.
Toujours
"".URL de la documentation des sous-codes.
{
"response_code": "00",
"token": "{PAYOUT_TOKEN}",
"response_text": "",
"description": "",
"custom_data": "",
"wiki": "https://client.ligdicash.com/wiki/createStraightWithdrawal"
}
{
"response_code": "01",
"token": "",
"response_text": "Echec (Code01)",
"wiki": "https://client.ligdicash.com/wiki/createStraightWithdrawal"
}
Codes d’erreur
Wiki :https://client.ligdicash.com/wiki/createStraightWithdrawal — voir Sous-codes par endpoint.
Guide associé
Payout Marchand — vers mobile money — différences avec le payout wallet.⌘I
