Skip to main content
GET
/
tsq
/
api
/
v1
/
wallet-balances
Get wallet balances
curl --request GET \
  --url https://dev.waftpay.io/tsq/api/v1/wallet-balances \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://dev.waftpay.io/tsq/api/v1/wallet-balances"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://dev.waftpay.io/tsq/api/v1/wallet-balances', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://dev.waftpay.io/tsq/api/v1/wallet-balances",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://dev.waftpay.io/tsq/api/v1/wallet-balances"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://dev.waftpay.io/tsq/api/v1/wallet-balances")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://dev.waftpay.io/tsq/api/v1/wallet-balances")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "code": 200,
  "status": "SUCCESS",
  "description": "Request processed successfully",
  "results": [
    {}
  ]
}
{
"code": 404,
"status": "FAILED",
"description": "Balances not found",
"results": {}
}
{
"code": 404,
"status": "FAILED",
"description": "Balances not found",
"results": {}
}
Fetch wallet balances associated with the product tied to your token (e.g., Collections, Payouts). Optionally filter by a specific currency (e.g., KES). If omitted, all balances for the product are returned.

Environments

EnvironmentBase URL
Sandboxhttps://dev.waftpay.io
Productionhttps://waftpay.io

Endpoint

GET /tsq/api/v1/wallet-balances?currency={CURRENCY}

Full URLs

EnvironmentURL
Sandboxhttps://dev.waftpay.io/tsq/api/v1/wallet-balances?currency=KES
Productionhttps://waftpay.io/tsq/api/v1/wallet-balances?currency=KES

Example request

curl -X GET \
  'https://dev.waftpay.io/tsq/api/v1/wallet-balances?currency=KES' \
  -H 'Authorization: Bearer <access_token>'

Authentication

This endpoint requires a Bearer token that is scoped to the product you are querying (e.g., a Collections token can only view Collections balances; a Payouts token can only view Payouts balances).
Authorization: Bearer <access_token>
If the token is invalid, expired, or not authorized for the requested product, you’ll receive 401 Unauthorized.

Query parameters

NameInTypeRequiredDescription
currencyquerystringNoISO currency code (e.g., KES, UGX). If omitted, returns all balances for the product tied to your token.

Successful responses

200 OK - All balances (no filter)

{
  "code": 200,
  "status": "SUCCESS",
  "description": "Request processed successfully",
  "results": [
    {
      "currency": "KES",
      "actual_balance": 10010110.0,
      "available_balance": 10010110.0,
      "alert_limit": 0.0,
      "status": "ACTIVE"
    }
  ]
}

200 OK - Specific currency present

{
  "code": 200,
  "status": "SUCCESS",
  "description": "Request processed successfully",
  "results": [
    {
      "currency": "UGX",
      "actual_balance": 12345.0,
      "available_balance": 12345.0,
      "alert_limit": 0.0,
      "status": "ACTIVE"
    }
  ]
}
  • actual_balance is the total ledger balance.
  • available_balance is the spendable amount after holds/reserves.
  • alert_limit is your configured low-balance threshold, if any.
  • status reflects wallet state, for example ACTIVE, INACTIVE, or SUSPENDED.

Error responses

404 Not Found - Currency not provisioned for this product

{
  "code": 404,
  "status": "FAILED",
  "description": "Balances not found",
  "results": {}
}

401 Unauthorized - Bad/expired token or wrong scope

{
  "code": 401,
  "status": "FAILED",
  "description": "Unauthorized",
  "results": {}
}

Behavior & constraints

  • Product scoping: The Bearer token determines which product’s wallets are visible (e.g., Collections vs Payouts).
  • Filtering: currency is optional; when omitted, all provisioned wallets for the token’s product are returned.
  • Idempotency: This is a GET and does not change state; no idempotency key required.
  • Caching: Avoid caching balances client-side if you need real-time accuracy.
  • Rate limits: Standard platform rate limits apply. Handle 429 with retries and backoff.
  • Currency codes: Must be ISO 4217 uppercase; unrecognized codes return 404 or an empty list depending on provisioning.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

currency
string

ISO currency code to filter the balance (e.g., KES, UGX, USD).

Example:

"KES"

Response

Balances fetched successfully

code
integer
required
Example:

200

status
string
required
Example:

"SUCCESS"

description
string
required
Example:

"Request processed successfully"

results
object[]
required