Historique des transactions
curl --request GET \
--url https://api.example.com/v1/payments/historyimport requests
url = "https://api.example.com/v1/payments/history"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/v1/payments/history', 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/history",
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/history"
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/history")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/payments/history")
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
Historique des transactions
Lister l’historique des transactions
GET
/
v1
/
payments
/
history
Historique des transactions
curl --request GET \
--url https://api.example.com/v1/payments/historyimport requests
url = "https://api.example.com/v1/payments/history"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/v1/payments/history', 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/history",
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/history"
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/history")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/payments/history")
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_bodyHistorique des transactions
Endpoint
GET /v1/payments/history
Cet endpoint lit l’historique des transactions de l’ancien flux de paiement. Les paiements créés via
POST /v1/payments n’y figurent pas : pour eux, utilisez les webhooks, GET /v1/payments/search
(par client_reference) ou GET /v1/payments/{id}/details, ou les exports du dashboard.Query parameters
| Paramètre | Type | Description |
|---|---|---|
limit | integer | Résultats (défaut 20, max 100) |
offset | integer | Décalage (défaut 0) |
status | string | Filtrer par statut |
start_date | string | created_at >= (ISO ou YYYY-MM-DD) |
end_date | string | created_at <= (ISO ou YYYY-MM-DD) |
Exemple
curl "https://api.sahelpay.ml/v1/payments/history?limit=20&offset=0&status=SUCCESS" \
-H "Authorization: Bearer sk_test_xxx"
Réponse
{
"success": true,
"data": {
"transactions": [
{
"id": "...",
"reference_id": "...",
"amount": 5000,
"currency": "XOF",
"provider": "ORANGE_MONEY",
"status": "SUCCESS",
"customer_phone": "+22370123456",
"recipient_alias": null,
"description": "Commande #123",
"created_at": "2026-10-03T10:00:00.000Z"
}
],
"pagination": { "total": 1, "limit": 20, "offset": 0 }
}
}
payments.list() (JS, Python), $sahelpay->payments->all() (PHP).