Get status transaction
L'opération "Obtenir le statut d'une transaction" permet aux utilisateurs de récupérer des informations détaillées sur l'état actuel d'une transaction financière effectuée au sein de la plateforme.
GET
https://api.digitalpaye.com/v1/get-status-payment/{{reference}}
Headers
Name
Value
Content-Type
application/json
Authorization
Bearer <
AccessToken>
X-Environment
Production
{
"statusCode": 200,
"message": "Successful",
"data": {
"ref": "GJ948M5X6V",
"transactionId": "DIGITAL-79110123118182",
"currency": "XOF",
"amount": "500",
"fees": "7.5",
"amountReceive": "500",
"amountTotal": "507.5",
"phone": "0777101308",
"status": "SUCCESSFUL",
"typeTransaction": "transfer",
"operator": "WAVE_MONEY_CI",
"createdAt": "2024-10-11T07:12:44.000Z",
"customer": {
"id": "26b35534-3165-4143-8fff-ec2f70bb430c",
"lastName": "GUEI",
"firstName": "HELIE",
"email": "elieguei225@gmail.com",
"phoneNumber": "0777101308",
"address": {
"countryCode": "CI",
"city": "Abidjan",
"streetAddress": "Plateau Cocody"
},
"createdAt": "2024-10-11T07:07:59.000Z"
}
}
}
{
"statusCode": 401,
"message": "UnauthorizedError",
"reason": "En-tête d'autorisation manquant ou invalide."
}
{
"statusCode": 404,
"message": "NotFoundError",
"reason": "Aucune transaction trouvée."
}
{
"statusCode": 500,
"message": "InternalServerError",
"reason": "Une erreur est survenue. Veuillez réessayer"
}
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.digitalpaye.com/v1/get-status-payment/GJ948M5X6V',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'X-Environment: Production',
'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjb21wYW55SWQiOiI4NDM3ZGQxMy04OWFjLTQ1ZTEtYTdhYS1jOGJhMDk1ZDFiMjciLCJpYXQiOjE3Mjg2MzU1NDAsImV4cCI6MTcyODYzNjE0MH0.zGNX-MBJwsGTSkpr06ypPWrkmf9yJ9XGkqaS-2P_goM'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
<?php
$client = new Client();
$headers = [
'X-Environment' => 'Production',
'Authorization' => 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjb21wYW55SWQiOiI4NDM3ZGQxMy04OWFjLTQ1ZTEtYTdhYS1jOGJhMDk1ZDFiMjciLCJpYXQiOjE3Mjg2MzU1NDAsImV4cCI6MTcyODYzNjE0MH0.zGNX-MBJwsGTSkpr06ypPWrkmf9yJ9XGkqaS-2P_goM'
];
$request = new Request('GET', 'https://api.digitalpaye.com/v1/get-status-payment/GJ948M5X6V', $headers);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
.url("https://api.digitalpaye.com/v1/get-status-payment/GJ948M5X6V")
.method("GET", body)
.addHeader("X-Environment", "Production")
.addHeader("Authorization", "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjb21wYW55SWQiOiI4NDM3ZGQxMy04OWFjLTQ1ZTEtYTdhYS1jOGJhMDk1ZDFiMjciLCJpYXQiOjE3Mjg2MzU1NDAsImV4cCI6MTcyODYzNjE0MH0.zGNX-MBJwsGTSkpr06ypPWrkmf9yJ9XGkqaS-2P_goM")
.build();
Response response = client.newCall(request).execute();
const axios = require('axios');
let config = {
method: 'get',
maxBodyLength: Infinity,
url: 'https://api.digitalpaye.com/v1/get-status-payment/GJ948M5X6V',
headers: {
'X-Environment': 'Production',
'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjb21wYW55SWQiOiI4NDM3ZGQxMy04OWFjLTQ1ZTEtYTdhYS1jOGJhMDk1ZDFiMjciLCJpYXQiOjE3Mjg2MzU1NDAsImV4cCI6MTcyODYzNjE0MH0.zGNX-MBJwsGTSkpr06ypPWrkmf9yJ9XGkqaS-2P_goM'
}
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
var headers = {
'X-Environment': 'Production',
'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjb21wYW55SWQiOiI4NDM3ZGQxMy04OWFjLTQ1ZTEtYTdhYS1jOGJhMDk1ZDFiMjciLCJpYXQiOjE3Mjg2MzU1NDAsImV4cCI6MTcyODYzNjE0MH0.zGNX-MBJwsGTSkpr06ypPWrkmf9yJ9XGkqaS-2P_goM'
};
var request = http.Request('GET', Uri.parse('https://api.digitalpaye.com/v1/get-status-payment/GJ948M5X6V'));
request.headers.addAll(headers);
http.StreamedResponse response = await request.send();
if (response.statusCode == 200) {
print(await response.stream.bytesToString());
}
else {
print(response.reasonPhrase);
}
Dernière mise à jour
Cet article vous a-t-il été utile ?