Account Information


Endpoint

For getting and updating account information, the base url is:

@bulk_base/api/v1

Check Account Balance

Method URI
GET /account/balance

{info} Remember to always include the Request header. See how HERE

Sample Success Response

StatusCode 200

Content

{
    "status": true,
    "data": {
        "account_balance": 691602.5,
        "account_units": 1383205,
        "date": "2020-01-16 10:52:30"
    }
}

Top Up

With this end-point, you can top-up a sub-account, from a MAIN account ONLY!

Method URI
POST /account/top-up

Request Params

Param Type Description
amount string(required) Amount in KES to top up a new account
account_id string(required) Account Id of sub account to be topped up
topup_reference string(optional) Top up Reference string generated by your system

Sample Request

{
    "amount": 100,
    "account_id": 2
}

Sample Success Response

StatusCode 200

Content

{
    "status": true,
    "data": {
        "topup_id": 10,
        "account_id": 2,
        "updated_amount": 219,
        "parent_id": 1,
        "parent_amount": 691602.5,
        "topup_reference": null
    }
}