Payment Limitation
To get the payment limitation of a single country code in the NoWallet system, use the following endpoint:
{baseUrl}/limitation/paymentAdditionally, the request must include the country query parameter in the URL to specify the country code for which you want to check the payment limitation. If for example you want to check the payment limitation for Cameroon, the URL would look like this:
{baseUrl}/limitation/payment?country=CM.
Request Parameters
When checking the payment limitation, the request must include the following parameters in the URL:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| country | query | string | true | country code will be checked |
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 payment limitation of a single country code 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 parameters.
- cURL
- HTTP
- JavaScript
- Ruby
- Python
- PHP
- Java
- Go
# Example cURL command to get payment limitation
curl -X GET {baseUrl}/limitation/payment?country=string \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
GET {baseUrl}/limitation/payment?country=string HTTP/1.1
Accept: application/json
const headers = {
Accept: "application/json",
Authorization: "Bearer {access-token}",
};
fetch("{baseUrl}/limitation/payment?country=string", {
method: "GET",
headers: headers,
})
.then(function (res) {
return res.json();
})
.then(function (body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.get '{baseUrl}/limitation/payment',
params: {
'country' => 'string'
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.get('{baseUrl}/limitation/payment', params={
'country': 'string'
}, headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','{baseUrl}/limitation/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}/limitation/payment?country=string");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
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{
"Accept": []string{"application/json"},
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "{baseUrl}/limitation/payment", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
Response Parameters
The response from the API will include the following parameters:
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | payment limitation fetched successfully | Inline |
| 400 | Bad Request | Bad Request possible errors | None |
Response Schema
For status
200, the response will include the following fields:
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| anonymous | [PaymentLimitationAmountDto] | false | none | none |
| » max_amount | number | true | none | transaction maximum amount |
| » min_amount | number | true | none | transaction minimum amount |
| » method | string | true | none | transaction method of limitation |
| » country | string | true | none | transaction country code of limitation |
Response Types
The response will be in JSON format and will include the payment limitation information for the specified country code.
Success Response (200 OK)
Example of a successful response with payment limitation informations for Cameroon.
[
{
"max_amount": 100000,
"min_amount": 10,
"method": "CASHIN",
"country": "CM"
}
]
Error Response (400 Bad Request)
Bad Request possible errors
{
"statusCode": 400,
"error": "COUNTRY_CODE_NOT_FOUND",
"message": "It seems that this country code does not exist or You can't perform this action, this token does not allow you"
}
Enumerated Values
The following enumerated values are used in the API:
- Method: The method of payment limitation can be one of the following:
CASHIN: Represents a cash-in transaction.CASHOUT: Represents a cash-out transaction.MERCHANT: Represents a merchant transaction.
- Country: The country code for which the payment limitation is applicable. This should be a valid ISO 3166-1 alpha-2 country code (e.g.,
CMfor Cameroon).
This table provides a summary of the enumerated values used in the API:
| Property | Value |
|---|---|
| method | CASHIN |
| method | MERCHANT |
| method | CASHOUT |
| country | DZ |
| country | AO |
| country | BJ |
| country | BW |
| country | BF |
| country | BI |
| country | CM |
| country | CV |
| country | CF |
| country | TD |
| country | KM |
| country | CG |
| country | CD |
| country | CI |
| country | DJ |
| country | EG |
| country | GQ |
| country | ER |
| country | ET |
| country | GA |
| country | GM |
| country | GH |
| country | GN |
| country | GW |
| country | KE |
| country | LS |
| country | LR |
| country | LY |
| country | MG |
| country | MW |
| country | ML |
| country | MR |
| country | MU |
| country | YT |
| country | MA |
| country | MZ |
| country | NA |
| country | NE |
| country | NG |
| country | RE |
| country | RW |
| country | ST |
| country | SN |
| country | SC |
| country | SL |
| country | SO |
| country | ZA |
| country | SS |
| country | SD |
| country | SZ |
| country | TZ |
| country | TG |
| country | TN |
| country | UG |
| country | EH |
| country | ZM |
| country | ZW |
Was this page helpful?