Statut d'un paiement
curl --request GET \
--url https://api.example.com/v1/payments/{id}/statusimport requests
url = "https://api.example.com/v1/payments/{id}/status"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/v1/payments/{id}/status', 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/payments/{id}/status",
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/payments/{id}/status"
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/payments/{id}/status")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/payments/{id}/status")
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_bodyPaiements
Statut d'un paiement
Lire le statut d’un paiement
GET
/
v1
/
payments
/
{id}
/
status
Statut d'un paiement
curl --request GET \
--url https://api.example.com/v1/payments/{id}/statusimport requests
url = "https://api.example.com/v1/payments/{id}/status"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/v1/payments/{id}/status', 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/payments/{id}/status",
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/payments/{id}/status"
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/payments/{id}/status")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/payments/{id}/status")
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_bodyStatut d’un paiement
Endpoint authentifié (recommandé)
GET /v1/payments/{id}/status
| Paramètre | Type | Description |
|---|---|---|
id | string | ID du paiement renvoyé à la création (UUID) |
curl https://api.sahelpay.ml/v1/payments/8d6f1c2e-.../status \
-H "Authorization: Bearer sk_test_xxx"
{
"success": true,
"data": {
"id": "8d6f1c2e-...",
"status": "SUCCESS",
"payment_method": "MOBILE_MONEY",
"country": "ML",
"amount": 5000,
"amount_charged": 5000,
"currency": "XOF",
"provider_ref": "MP261003.1000.A12345",
"redirect_url": "https://...",
"expires_at": "2026-10-03T10:30:00.000Z",
"created_at": "2026-10-03T10:00:00.000Z",
"updated_at": "2026-10-03T10:05:00.000Z"
}
}
sahelpay_mock), cet appel applique le statut simulé et déclenche le webhook correspondant.
SDKs : sahelpay.payments.retrieve(id) / checkStatus(id) (JS), client.payments.retrieve(id) / check_status(id) (Python), $sahelpay->payments->verify($id) (PHP).
Si le paiement est introuvable, la réponse est
200 avec { "success": false, "message": "PaymentIntent not found" }.Endpoint public
GET /v1/payments/{id}
id, status, les montants, currency, reference (votre client_reference ou un code court), return_url, created_at et updated_at. Si un paiement est PENDING depuis plus de quelques secondes, l’appel déclenche une revérification auprès de l’opérateur.
Statuts
| Statut | Description |
|---|---|
INITIATED | Créé, pas encore initié auprès de l’opérateur |
PENDING | En attente de validation du client |
SUCCESS | Paiement confirmé |
FAILED | Paiement échoué |
EXPIRED | Expiré (délai écoulé ou POST /v1/payments/{id}/expire) |