Lister, solde et annulation
curl --request GET \
--url https://api.example.com/v1/withdrawalsimport requests
url = "https://api.example.com/v1/withdrawals"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/v1/withdrawals', 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.example.com/v1/withdrawals",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.example.com/v1/withdrawals"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/v1/withdrawals")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/withdrawals")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyWithdrawals
Lister, solde et annulation
Suivre vos demandes de retrait, lire votre solde, annuler une demande
GET
/
v1
/
withdrawals
Lister, solde et annulation
curl --request GET \
--url https://api.example.com/v1/withdrawalsimport requests
url = "https://api.example.com/v1/withdrawals"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/v1/withdrawals', 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.example.com/v1/withdrawals",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.example.com/v1/withdrawals"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/v1/withdrawals")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/withdrawals")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyLister les retraits
Endpoints
| Endpoint | Méthode | Description |
|---|---|---|
/v1/withdrawals | GET | Liste paginée (page, limit) |
/v1/withdrawals/balance | GET | Solde disponible (source : grand livre) |
/v1/withdrawals/quote?amount= | GET | Frais et montant reçu avant confirmation |
/v1/withdrawals/stats | GET | Compteurs par statut |
/v1/withdrawals/{id}/cancel | PATCH | Annuler une demande encore PENDING |
Lister
curl "https://api.sahelpay.ml/v1/withdrawals?page=1&limit=20" \
-H "Authorization: Bearer sk_live_xxx"
{
"success": true,
"data": {
"withdrawals": [
{
"id": "0b6c0f3e-...",
"reference": "WD_1759480000000_A1B2C3D4",
"amount": 100000,
"fee": 1000,
"net_amount": 99000,
"currency": "XOF",
"status": "COMPLETED",
"provider": "ORANGE_MONEY",
"phone_number": "+22370123456",
"notes": null,
"processed_at": "2026-10-03T14:00:00.000Z",
"transfer_reference": "MP261003.1400.A12345",
"created_at": "2026-10-03T10:00:00.000Z"
}
],
"pagination": { "page": 1, "limit": 20, "total": 1, "pages": 1 }
}
}
PENDING, PROCESSING, COMPLETED, REJECTED, CANCELLED.
Solde
const balance = await sahelpay.withdrawals.balance();
// available_balance, pending_balance, reserved_balance, total_balance,
// pending_withdrawals, currency, kyc_level, kyc_status, computed_at
Annuler
await sahelpay.withdrawals.cancel('0b6c0f3e-...');
// { id, reference, status: 'CANCELLED' }
PENDING peuvent être annulées ; les fonds réservés sont restitués.