Réconcilier un paiement
curl --request POST \
--url https://api.example.com/v1/payments/{id}/reconcileimport requests
url = "https://api.example.com/v1/payments/{id}/reconcile"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/v1/payments/{id}/reconcile', 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}/reconcile",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$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}/reconcile"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/v1/payments/{id}/reconcile")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/payments/{id}/reconcile")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyPaiements
Réconcilier un paiement
Revérifier auprès de l’opérateur un paiement en attente
POST
/
v1
/
payments
/
{id}
/
reconcile
Réconcilier un paiement
curl --request POST \
--url https://api.example.com/v1/payments/{id}/reconcileimport requests
url = "https://api.example.com/v1/payments/{id}/reconcile"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/v1/payments/{id}/reconcile', 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}/reconcile",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$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}/reconcile"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/v1/payments/{id}/reconcile")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/payments/{id}/reconcile")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyRéconcilier un paiement
Si un paiement restePENDING (par exemple après un webhook manqué), cet endpoint demande à SahelPay de revérifier son statut auprès de l’opérateur et de le mettre à jour. Un changement de statut déclenche le webhook correspondant.
Limite : 10 appels par minute.
Path Parameters
| Paramètre | Type | Requis | Description |
|---|---|---|---|
id | string | ✅ | ID du paiement (UUID) |
Exemple
curl -X POST https://api.sahelpay.ml/v1/payments/8d6f1c2e-.../reconcile \
-H "Authorization: Bearer sk_live_xxx"
payments.reconcile(id) (JS, Python), $sahelpay->payments->reconcile($id) (PHP).
Réponse
{
"success": true,
"data": {
"id": "8d6f1c2e-...",
"updated": true,
"new_status": "SUCCESS",
"message": "PaymentIntent status updated to SUCCESS"
}
}
updated: false et "message": "PaymentIntent still PENDING or already finalized". Si la vérification est impossible pour le moment : 200 avec success: false et un message invitant à réessayer.
SahelPay réconcilie aussi automatiquement les paiements
PENDING en arrière-plan.