Get wallet balances
curl --request GET \
--url https://dev.waftpay.io/tsq/v1/wallet-balances \
--header 'Authorization: Bearer <token>'import requests
url = "https://dev.waftpay.io/tsq/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/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/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/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/v1/wallet-balances")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://dev.waftpay.io/tsq/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": {}
}Wallet
Get Balance
Fetch wallet balances for the authenticated product (collections, payouts, etc.). Filter by currency or fetch all.
GET
/
tsq
/
v1
/
wallet-balances
Get wallet balances
curl --request GET \
--url https://dev.waftpay.io/tsq/v1/wallet-balances \
--header 'Authorization: Bearer <token>'import requests
url = "https://dev.waftpay.io/tsq/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/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/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/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/v1/wallet-balances")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://dev.waftpay.io/tsq/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
If the token is invalid, expired, or not authorized for the requested product, you’ll receive
currency (e.g., KES). If omitted, all balances for the product are returned.
Environments
| Environment | Base URL |
|---|---|
| Sandbox | https://dev.waftpay.io |
| Production | https://api.waftpay.io |
Endpoint
GET https://api.waftpay.io/tsq/v1/wallet-balances?currency={CURRENCY}
GET https://dev.waftpay.io/tsq/v1/wallet-balances?currency={CURRENCY}
Example request
- Sandbox
- Production
curl -X GET \
'https://dev.waftpay.io/tsq/v1/wallet-balances?currency=KES' \
-H 'Authorization: Bearer <access_token>'
curl -X GET \
'https://api.waftpay.io/tsq/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>
401 Unauthorized.
Query parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
currency | query | string | No | ISO 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_balanceis the total ledger balance.available_balanceis the spendable amount after holds/reserves.alert_limitis your configured low-balance threshold, if any.statusreflects wallet state, for exampleACTIVE,INACTIVE, orSUSPENDED.
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:
currencyis optional; when omitted, all provisioned wallets for the token’s product are returned. - Idempotency: This is a
GETand 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
429with retries and backoff. - Currency codes: Must be ISO 4217 uppercase; unrecognized codes return
404or an empty list depending on provisioning.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
ISO currency code to filter the balance (e.g., KES, UGX, USD).
Example:
"KES"
