GET: Payments Wallet Balance

On DarajaPay Kenya when you create an account, you get a payments wallet, this wallet is used to hold funds that customers Pay You via 3rd party services that we have integrated with.

You can withdraw funds held in your payments wallet to MPESA, Airtel Money, T-Kash, or Bank Accounts.

API Method

This endpoint is used to query for your payments wallet balance

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

Query Parameters

Name Type Description
wallet_type* String Value : payment_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": 22157,
    "account_id": 22183,
    "wallet_type": "payment_wallet",
    "currency": "KES",
    "available_balance": 22164,
    "created_at": "2024-01-12T08:36:38.210546Z",
    "updated_at": "2024-01-14T10:13:14.256338Z"
}

Code Examples

PHP
<?php
$url = 'https://darajapay.com/api/v1/wallets?wallet_type=payments_wallet';

$headers = array(
    'Content-Type: application/json',
    'Authorization: Basic YOUR_API_KEY'
);

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$response = curl_exec($ch);
curl_close($ch);

echo $response;