Vérifier le statut d'un paiement
curl --request GET \
--url https://api.saspay.me/api/v1/payments/{payment_id}/verify/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.saspay.me/api/v1/payments/{payment_id}/verify/"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.saspay.me/api/v1/payments/{payment_id}/verify/', 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/payments/{payment_id}/verify/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.saspay.me/api/v1/payments/{payment_id}/verify/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.saspay.me/api/v1/payments/{payment_id}/verify/")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.saspay.me/api/v1/payments/{payment_id}/verify/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"message": "Payment transaction fetched successfully",
"id": "9c3f2a10-4b7e-4f1a-9d2e-9b6a7c1e4a02",
"reference": "TXN-20260812-000512",
"merchant": "6f1e2b3a-8c4d-4a2f-9e1b-2d3c4f5a6b7c",
"customer": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"country": "3d4e5f6a-7b8c-4d9e-8f0a-1b2c3d4e5f6a",
"network": "5e6f7a8b-9c0d-4e1f-8a2b-3c4d5e6f7a8b",
"transaction_type": "PAIEMENT",
"flow_direction": "INBOUND",
"description": "Abonnement mensuel",
"requested_amount": "2500.00",
"fee_charge_mode": "ADD_ON",
"client_fee": "37.50",
"gateway_fee": "20.00",
"platform_fee": "17.50",
"pricing_rule": null,
"merchant_pricing_rule": "7f8e9d0c-1b2a-4c3d-9e0f-1a2b3c4d5e6f",
"debited_amount": "2537.50",
"net_amount": "2500.00",
"currency": "XOF",
"status": "SUCCESS",
"current_gateway": "2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e",
"external_reference": "PWP-8827311",
"ip_address": "154.72.18.90",
"created_at": "2026-08-12T09:58:11Z",
"updated_at": "2026-08-12T09:58:47Z"
}{
"message": "Transaction introuvable.",
"code": "not_found"
}Paiements
Vérifier le statut d'un paiement
Revérifie toujours l’état réel côté gateway si le statut est PENDING
GET
/
payments
/
{payment_id}
/
verify
/
Vérifier le statut d'un paiement
curl --request GET \
--url https://api.saspay.me/api/v1/payments/{payment_id}/verify/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.saspay.me/api/v1/payments/{payment_id}/verify/"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.saspay.me/api/v1/payments/{payment_id}/verify/', 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/payments/{payment_id}/verify/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.saspay.me/api/v1/payments/{payment_id}/verify/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.saspay.me/api/v1/payments/{payment_id}/verify/")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.saspay.me/api/v1/payments/{payment_id}/verify/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"message": "Payment transaction fetched successfully",
"id": "9c3f2a10-4b7e-4f1a-9d2e-9b6a7c1e4a02",
"reference": "TXN-20260812-000512",
"merchant": "6f1e2b3a-8c4d-4a2f-9e1b-2d3c4f5a6b7c",
"customer": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"country": "3d4e5f6a-7b8c-4d9e-8f0a-1b2c3d4e5f6a",
"network": "5e6f7a8b-9c0d-4e1f-8a2b-3c4d5e6f7a8b",
"transaction_type": "PAIEMENT",
"flow_direction": "INBOUND",
"description": "Abonnement mensuel",
"requested_amount": "2500.00",
"fee_charge_mode": "ADD_ON",
"client_fee": "37.50",
"gateway_fee": "20.00",
"platform_fee": "17.50",
"pricing_rule": null,
"merchant_pricing_rule": "7f8e9d0c-1b2a-4c3d-9e0f-1a2b3c4d5e6f",
"debited_amount": "2537.50",
"net_amount": "2500.00",
"currency": "XOF",
"status": "SUCCESS",
"current_gateway": "2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e",
"external_reference": "PWP-8827311",
"ip_address": "154.72.18.90",
"created_at": "2026-08-12T09:58:11Z",
"updated_at": "2026-08-12T09:58:47Z"
}{
"message": "Transaction introuvable.",
"code": "not_found"
}Si la transaction est encore
PENDING, SasPay revérifie toujours son état réel auprès du gateway avant de répondre — jamais confiance dans un statut mémorisé. La réponse contient les mêmes champs qu’une transaction.⌘I