Détail d'une transaction
curl --request GET \
--url https://api.saspay.me/api/v1/transactions/{id}/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.saspay.me/api/v1/transactions/{id}/"
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/transactions/{id}/', 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/transactions/{id}/",
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/transactions/{id}/"
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/transactions/{id}/")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.saspay.me/api/v1/transactions/{id}/")
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{
"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",
"attempts": [
{
"id": "d3e4f5a6-b7c8-4d9e-8f0a-1b2c3d4e5f6a",
"transaction": "9c3f2a10-4b7e-4f1a-9d2e-9b6a7c1e4a02",
"gateway": "2e3f4a5b-6c7d-4e8f-8a9b-0c1d2e3f4a5b",
"priority": 0,
"status": "FAILED",
"error_code": "",
"error_message": "Solde opérateur insuffisant côté gateway",
"started_at": "2026-08-12T09:57:40Z",
"ended_at": "2026-08-12T09:57:58Z",
"created_at": "2026-08-12T09:57:40Z",
"updated_at": "2026-08-12T09:57:58Z"
},
{
"id": "b1c2d3e4-f5a6-4b7c-8d9e-0f1a2b3c4d5e",
"transaction": "9c3f2a10-4b7e-4f1a-9d2e-9b6a7c1e4a02",
"gateway": "2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e",
"priority": 1,
"status": "SUCCESS",
"error_code": "",
"error_message": "",
"started_at": "2026-08-12T09:58:11Z",
"ended_at": "2026-08-12T09:58:45Z",
"created_at": "2026-08-12T09:58:11Z",
"updated_at": "2026-08-12T09:58:45Z"
}
],
"status_logs": [
{
"id": "e5f6a7b8-c9d0-4e1f-8a2b-3c4d5e6f7a8b",
"transaction": "9c3f2a10-4b7e-4f1a-9d2e-9b6a7c1e4a02",
"from_status": null,
"to_status": "PENDING",
"reason": "",
"triggered_by": "SYSTEM",
"created_at": "2026-08-12T09:57:40Z"
},
{
"id": "c1d2e3f4-a5b6-4c7d-8e9f-0a1b2c3d4e5f",
"transaction": "9c3f2a10-4b7e-4f1a-9d2e-9b6a7c1e4a02",
"from_status": "PENDING",
"to_status": "SUCCESS",
"reason": "Paiement confirmé par le gateway",
"triggered_by": "SYSTEM",
"created_at": "2026-08-12T09:58:47Z"
}
]
}Transactions
Détail d'une transaction
Ajoute les tentatives de routage et l’historique des changements de statut
GET
/
transactions
/
{id}
/
Détail d'une transaction
curl --request GET \
--url https://api.saspay.me/api/v1/transactions/{id}/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.saspay.me/api/v1/transactions/{id}/"
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/transactions/{id}/', 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/transactions/{id}/",
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/transactions/{id}/"
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/transactions/{id}/")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.saspay.me/api/v1/transactions/{id}/")
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{
"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",
"attempts": [
{
"id": "d3e4f5a6-b7c8-4d9e-8f0a-1b2c3d4e5f6a",
"transaction": "9c3f2a10-4b7e-4f1a-9d2e-9b6a7c1e4a02",
"gateway": "2e3f4a5b-6c7d-4e8f-8a9b-0c1d2e3f4a5b",
"priority": 0,
"status": "FAILED",
"error_code": "",
"error_message": "Solde opérateur insuffisant côté gateway",
"started_at": "2026-08-12T09:57:40Z",
"ended_at": "2026-08-12T09:57:58Z",
"created_at": "2026-08-12T09:57:40Z",
"updated_at": "2026-08-12T09:57:58Z"
},
{
"id": "b1c2d3e4-f5a6-4b7c-8d9e-0f1a2b3c4d5e",
"transaction": "9c3f2a10-4b7e-4f1a-9d2e-9b6a7c1e4a02",
"gateway": "2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e",
"priority": 1,
"status": "SUCCESS",
"error_code": "",
"error_message": "",
"started_at": "2026-08-12T09:58:11Z",
"ended_at": "2026-08-12T09:58:45Z",
"created_at": "2026-08-12T09:58:11Z",
"updated_at": "2026-08-12T09:58:45Z"
}
],
"status_logs": [
{
"id": "e5f6a7b8-c9d0-4e1f-8a2b-3c4d5e6f7a8b",
"transaction": "9c3f2a10-4b7e-4f1a-9d2e-9b6a7c1e4a02",
"from_status": null,
"to_status": "PENDING",
"reason": "",
"triggered_by": "SYSTEM",
"created_at": "2026-08-12T09:57:40Z"
},
{
"id": "c1d2e3f4-a5b6-4c7d-8e9f-0a1b2c3d4e5f",
"transaction": "9c3f2a10-4b7e-4f1a-9d2e-9b6a7c1e4a02",
"from_status": "PENDING",
"to_status": "SUCCESS",
"reason": "Paiement confirmé par le gateway",
"triggered_by": "SYSTEM",
"created_at": "2026-08-12T09:58:47Z"
}
]
}⌘I