Check Status
To check the status of a payment in the NoWallet system, use the following endpoint:
{baseUrl}/check/status/paymentRequest Status Parameters
When checking the status of a payment, the request must include the following parameters in the request body:
When checking the status of a payment, the request body must include the following parameters in JSON format.
The signature is the unique identifier for the payment to check the status of.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | body | SignatureDTO | true | none |
Example Request Body
{
"signature": "EXAMPLE-ba325fc6-ca09eb7b4dce"
}
Code Samples in Multiple Languages
To help you integrate the NoWallet API seamlessly, we provide code samples in various programming languages. These examples demonstrate how to make a request to the API endpoint and handle the response.
- Shell (cURL): For quick testing and command-line usage.
- HTTP: Raw HTTP request format for understanding the structure.
- JavaScript: Using
fetchfor browser or Node.js environments. - Ruby: Using the
rest-clientlibrary for Ruby applications. - Python: Using the
requestslibrary for Python projects. - PHP: Using
GuzzleHttpfor PHP integrations. - Java: Using
HttpURLConnectionfor Java applications. - Go: Using the
net/httppackage for Go projects.
Example Request
Below is an example of how to check the status of a payment using different languages. Select the tab corresponding to your preferred language to view the implementation.
Ensure you replace {access-token} with your actual API token and provide the required request body parameters.
- cURL
- HTTP
- JavaScript
- Ruby
- Python
- PHP
- Java
- Go
# Exemple cURL command to check payment status
curl -X POST {baseUrl}/check/status/payment \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
POST {baseUrl}/check/status/payment HTTP/1.1
Content-Type: application/json
Accept: application/json
const inputBody = {
signature: "EXAMPLE-ba325fc6-ca09eb7b4dce",
};
const headers = {
"Content-Type": "application/json",
Accept: "application/json",
Authorization: "Bearer {access-token}",
};
fetch("{baseUrl}/check/status/payment", {
method: "POST",
body: inputBody,
headers: headers,
})
.then(function (res) {
return res.json();
})
.then(function (body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.post '{baseUrl}/check/status/payment',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.post('{baseUrl}/check/status/payment', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','{baseUrl}/check/status/payment', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("{baseUrl}/check/status/payment");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "{baseUrl}/check/status/payment", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
Response Parameters
When you make a request to check the payment status, the response will include the following parameters in JSON format.
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Transaction infos fetch successfully | StatePaymentResponseDto |
| 404 | Not Found | Transaction status UNKNOWN , signature closed | None |
Response Types
The response from the server will include the status of the payment initialization and any relevant information. The response will be in JSON format.
Success Response (200 OK)
Transaction infos fetch successfully
{
"status": "SUCCESS",
"transaction_id": "EXAMPLE-ba325fc6-ca09eb7b4dce",
"additional_infos": {
"customer_email": "[email protected]",
"customer_lastname": "Doe",
"customer_firstname": "John",
"customer_phone": "+237691234567"
},
"amount": 200,
"currency": "XAF",
"fee_percent": 1.2,
"fee_value": 20,
"balance": 200,
"balance_before": 180,
"balance_after": 220,
"transaction_method": "MERCHANT",
"transaction_phone_number": "691234567",
"transaction_dialcode": "+237",
"signature": "EXAMPLE-XXXXX-XXXXX",
"transaction_date": "2025-01-01TZ00:00:00",
"transaction_country_code": "CM",
"transaction_service_name": "ORANGE MONEY",
"transaction_observation": ""
}
Was this page helpful?