GET: Payments Wallet Balance

On Pay Hero 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://backend.payhero.co.ke/api/v2/wallets

Query Parameters

Headers

{
    "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"
}

Sample Code

This represents PHP Curl example of how to make the request, you can implement this in your specific language of choice

<?php
$curl = curl_init();
curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://backend.payhero.co.ke/api/v2/wallets?wallet_type=payment_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 3A6anVoWFZrRk5qSVl0MGNMOERGMlR3dlhrQ0VWUWJHNDVVVnNaMEdDSw=='
  ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;

Last updated