Rechercher des Transactions
curl --request GET \
--url https://sandbox.fapshi.com/search \
--header 'apikey: <api-key>' \
--header 'apiuser: <api-key>'const options = {method: 'GET', headers: {apiuser: '<api-key>', apikey: '<api-key>'}};
fetch('https://sandbox.fapshi.com/search', 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://sandbox.fapshi.com/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"apikey: <api-key>",
"apiuser: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}import requests
url = "https://sandbox.fapshi.com/search"
headers = {
"apiuser": "<api-key>",
"apikey": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)HttpResponse<String> response = Unirest.get("https://sandbox.fapshi.com/search")
.header("apiuser", "<api-key>")
.header("apikey", "<api-key>")
.asString();package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://sandbox.fapshi.com/search"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("apiuser", "<api-key>")
req.Header.Add("apikey", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}[
{
"transId": "<string>",
"status": "CREATED",
"medium": "mobile money",
"serviceName": "<string>",
"transType": "Collection",
"amount": 123,
"revenue": 123,
"payerName": "<string>",
"email": "jsmith@example.com",
"redirectUrl": "<string>",
"externalId": "<string>",
"userId": "<string>",
"webhook": "<string>",
"reason": "<string>",
"financialTransId": "<string>",
"dateInitiated": "2023-12-25",
"dateConfirmed": "2023-12-25"
}
]{
"message": "<string>"
}Points de terminaison
Recherche de Transactions
Recherchez des transactions en utilisant différents critères de filtre.
GET
/
search
Rechercher des Transactions
curl --request GET \
--url https://sandbox.fapshi.com/search \
--header 'apikey: <api-key>' \
--header 'apiuser: <api-key>'const options = {method: 'GET', headers: {apiuser: '<api-key>', apikey: '<api-key>'}};
fetch('https://sandbox.fapshi.com/search', 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://sandbox.fapshi.com/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"apikey: <api-key>",
"apiuser: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}import requests
url = "https://sandbox.fapshi.com/search"
headers = {
"apiuser": "<api-key>",
"apikey": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)HttpResponse<String> response = Unirest.get("https://sandbox.fapshi.com/search")
.header("apiuser", "<api-key>")
.header("apikey", "<api-key>")
.asString();package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://sandbox.fapshi.com/search"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("apiuser", "<api-key>")
req.Header.Add("apikey", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}[
{
"transId": "<string>",
"status": "CREATED",
"medium": "mobile money",
"serviceName": "<string>",
"transType": "Collection",
"amount": 123,
"revenue": 123,
"payerName": "<string>",
"email": "jsmith@example.com",
"redirectUrl": "<string>",
"externalId": "<string>",
"userId": "<string>",
"webhook": "<string>",
"reason": "<string>",
"financialTransId": "<string>",
"dateInitiated": "2023-12-25",
"dateConfirmed": "2023-12-25"
}
]{
"message": "<string>"
}Endpoint
GET /search
Recherchez des transactions selon des critères.
Paramètres de requête
| Nom | Description | Valeurs acceptées |
|---|---|---|
| status | Filtrer les transactions par statut. | created, successful, failed, expired |
| medium | Filtrer par moyen de paiement. | mobile money, orange money |
| start | Date de début (AAAA-MM-JJ) pour filtrer les transactions initiées. | Format date |
| end | Date de fin (AAAA-MM-JJ) pour filtrer les transactions initiées. | Format date |
| amt | Montant exact pour filtrer. | Entier |
| limit | Nombre maximum de résultats (par défaut 10). | 1 à 100 |
| sort | Ordre de tri : asc ou desc. Par défaut, ordre descendant (le plus récent en premier). | asc, desc |
Les valeurs invalides des paramètres de requête sont ignorées.
Paramètres de requête
Réponse
Liste filtrée des transactions