Response
200 OK
integer
Available prepaid balance in minor units —
48200 = KES 482.00.402 INSUFFICIENT_CREDIT — so top up whenever this number gets low.Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Read your prepaid platform-fee wallet balance.
GET /api/v1/wallet/balance
curl "https://fortpesa.co.ke/api/v1/wallet/balance" \
-H "Authorization: Bearer pb_live_YOUR_KEY"
const res = await fetch("https://fortpesa.co.ke/api/v1/wallet/balance", {
headers: { Authorization: "Bearer pb_live_YOUR_KEY" },
});
const { data } = await res.json();
console.log(data.balance, data.currency); // 48200 "KES"
import requests
data = requests.get(
"https://fortpesa.co.ke/api/v1/wallet/balance",
headers={"Authorization": "Bearer pb_live_YOUR_KEY"},
timeout=30,
).json()["data"]
use GuzzleHttp\Client;
$client = new Client();
$data = json_decode((string) $client->get(
'https://fortpesa.co.ke/api/v1/wallet/balance',
['headers' => ['Authorization' => 'Bearer pb_live_YOUR_KEY']]
)->getBody(), true)['data'];
200 OK
{
"data": {
"merchant_id": 12,
"balance": 48200,
"currency": "KES"
}
}
48200 = KES 482.00.402 INSUFFICIENT_CREDIT — so top up whenever this number gets low.