PAY HERO DOCS
  • Introduction-Pay Hero Developer APIs
  • Creating Account
  • Authorization
  • GET: Service Wallet Balance
  • GET: Payments Wallet Balance
  • POST: Service Wallet Top Up
  • POST: Initiate MPESA STK Push Request
  • Payment Button
  • Lipwa Link
  • POST: Pay Hero Wallet- Withdraw To Mobile
  • GET: Account Transactions
  • GET: Transaction Status
  • WooCommerce Plugin
    • Plugin Installation
  • Shopify
  • Videos
  • Other Integrations
  • Email API Reference
    • Register SMTP
    • Send Email
    • Mail status
  • WhatsApp API Reference
    • Introduction
    • Getting Started
    • Send API Whats App Text
    • Bulk WhatsApp API Messaging
    • Bulk WhatsApp Using UI/CSV File
Powered by GitBook
On this page
  • API Method
  • This endpoint is used to query for your payments wallet balance
  • Sample Code

Was this helpful?

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.

PreviousGET: Service Wallet BalanceNextPOST: Service Wallet Top Up

Last updated 2 months ago

Was this helpful?

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

Query Parameters

Name
Type
Description

WalletChannelID*

Integer

Your wallet payment channel ID

Headers

Name
Type
Description

Authorization:*

String

Basic basicAuthToken

{
    "id": 16823,
    "transaction_type": "CustomerBuyGoodsOnline",
    "channel_type": "wallet",
    "account_id": 5234,
    "short_code": "553125",
    "account_number": "5234",
    "description": "SASAPAY WALLET",
    "is_active": true,
    "balance_plain": {
        "last_balance": 4700,
        "balance": 4700,
        "last_reference": "cost_TBH2D54JQA"
    },
    "created_at": "2025-02-13T15:39:14.5238Z",
    "updated_at": "2025-02-17T06:29:28.485494Z"
}

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/payment_channels/16823',
  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 b2pjSGc3OEVVanNHdDduU0lLQlVySlhkZk9SaFIwZw=='
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
https://backend.payhero.co.ke/api/v2/payment_channels/{WalletChannelID}