GET: Service Wallet Balance

On DarajaPay Kenya when you create an account, you get a service wallet, this wallet is used to fund your service usage like payments transaction costs, SMS, WhatsApp and withdrawals

API Method

This endpoint is used to query for your service wallet balance

GET https://darajapay.com/api/v1/wallets

Query Parameters

Name Type Description
wallet_type* String Value : service_wallet

Headers

Name Type Description
Authorization:* String Basic basicAuthToken

Response

200: OK Upon successful request you will get a JSON response as shown below

JSON
{
    "id": 22156,
    "account_id": 22183,
    "wallet_type": "service_wallet",
    "currency": "KES",
    "available_balance": 15101.36,
    "created_at": "2024-01-12T08:36:38.209573Z",
    "updated_at": "2024-01-15T12:40:33.157508Z"
}

Code Examples

PHP
 'https://darajapay.com/api/v1/wallets?wallet_type=service_wallet',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 0,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => array(
        'Authorization: Basic YOUR_API_KEY'
    ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;