Appearance
Wallet Balance
This endpoint is used to fetch the wallet balance in real time.
Endpoint
GET https://api.lipila.dev/api/v1/merchants/balance
Headers
The following headers are accepted.
| Header | Type | Description | Required |
|---|---|---|---|
accept | application/json | Expected response format | Yes |
x-api-key | string | Wallet API authentication key | Yes |
Example Request
bash
curl -X 'GET' \
'https://api.lipila.dev/api/v1/merchants/balance' \
-H 'accept: application/json' \
-H 'x-api-key: your_secret_key'python
import requests
url = "https://api.lipila.dev/api/v1/merchants/balance"
headers = {
"accept": "application/json",
"x-api-key": "your_secret_key"
}
response = requests.get(url, headers=headers)
print(response.json())csharp
using System.Net.Http;
var client = new HttpClient();
client.DefaultRequestHeaders.Add("accept", "application/json");
client.DefaultRequestHeaders.Add("x-api-key", "your_secret_key");
var response = await client.GetAsync(
"https://api.lipila.dev/api/v1/merchants/balance"
);
Console.WriteLine(await response.Content.ReadAsStringAsync());javascript
const response = await fetch("https://api.lipila.dev/api/v1/merchants/balance", {
method: "GET",
headers: {
"accept": "application/json",
"x-api-key": "your_secret_key"
}
});
const data = await response.json();
console.log(data);php
<?php
$url = "https://api.lipila.dev/api/v1/merchants/balance";
$headers = [
"accept: application/json",
"x-api-key: your_secret_key"
];
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPGET, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$response = curl_exec($ch);
curl_close($ch);
echo $response;Example Successful Response
Below is an example successful response.
js
{
"success": true,
"message": "Wallet balance retrieved successfully.",
"data": {
"balance": 80.771
}
}| HTTP Status Code | Error Code | Description |
|---|---|---|
| 200 | SUCCESSFUL | Request successful |
| 401 | UNAUTHORIZED | Missing or invalid API key |
| 403 | FORBIDDEN | API key is inactive or revoked |
| 429 | TOO MANY REQUESTS | Rate limit exceeded, slow down requests |