API Reference
Account
API REFERENCE
Account
Your prefunded balance.
Get Account Balance
Get your prefunded balance in one currency, plus your overdraft balance.
POST/accountaccounts@getAccountBalance
Request Body
FieldTypeRequiredDescription
paramsobjectYesParameters for the operation. Send
{} if there are none.currency_codestringYesCurrency of the balance to get One of:
KES, USD.Request Body Example
json
{
"jsonrpc": "2.0",
"method": "accounts@getAccountBalance",
"params": {
"currency_code": "KES"
},
"id": "1"
}JSON-RPC response
Response Fields
FieldTypeDescription
resultobjectOperation result
result.balancenumberAvailable balance (
0 if there is no account in this currency)result.currency_codestringCurrency requested
result.overdraftBalancenumberRemaining overdraft (
0 if none)Example Response
json
{
"jsonrpc": "2.0",
"result": {
"balance": 1250000,
"currency_code": "KES",
"overdraftBalance": 0
},
"id": "1"
}The bearer token is missing, invalid or expired. The response is plain JSON with HTTP
401, not a JSON-RPC envelope. Log in again and retry once.
Response Fields
FieldTypeDescription
statusstringAlways
401.messagestringError message
Example Response
json
{
"status": 401,
"message": "Failed, Not authorized"
}