Get service wallet balance
curl --request GET \
--url https://api.palpluss.com/v1/wallets/service/balance \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.palpluss.com/v1/wallets/service/balance"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.palpluss.com/v1/wallets/service/balance', 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://api.palpluss.com/v1/wallets/service/balance",
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: Basic <encoded-value>"
],
]);
$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://api.palpluss.com/v1/wallets/service/balance"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.palpluss.com/v1/wallets/service/balance")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.palpluss.com/v1/wallets/service/balance")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"walletId": "e3f2a1b0-0000-0000-0000-000000000001",
"tenantId": "b6fbe75f-ce87-4d44-b318-6cfdb8b7de4d",
"currency": "KES",
"availableBalance": 4250,
"ledgerBalance": 4250,
"updatedAt": "2026-03-01T10:00:00.000Z"
},
"requestId": "e3d4c5b6-0000-0000-0000-000000000000"
}{
"success": false,
"error": {
"message": "Invalid or revoked API key.",
"code": "INVALID_API_KEY",
"details": {}
},
"requestId": "a1b2c3d4-0000-0000-0000-000000000000"
}{
"success": false,
"error": {
"message": "Rate limit exceeded. Try again in 12 seconds.",
"code": "RATE_LIMIT_EXCEEDED",
"details": {
"limit": 60,
"remaining": 0,
"resetInSeconds": 12
}
},
"requestId": "a1b2c3d4-0000-0000-0000-000000000000"
}Service Wallet
Get Service Wallet Balance
Check the current balance of your service wallet.
GET
/
wallets
/
service
/
balance
Get service wallet balance
curl --request GET \
--url https://api.palpluss.com/v1/wallets/service/balance \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.palpluss.com/v1/wallets/service/balance"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.palpluss.com/v1/wallets/service/balance', 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://api.palpluss.com/v1/wallets/service/balance",
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: Basic <encoded-value>"
],
]);
$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://api.palpluss.com/v1/wallets/service/balance"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.palpluss.com/v1/wallets/service/balance")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.palpluss.com/v1/wallets/service/balance")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"walletId": "e3f2a1b0-0000-0000-0000-000000000001",
"tenantId": "b6fbe75f-ce87-4d44-b318-6cfdb8b7de4d",
"currency": "KES",
"availableBalance": 4250,
"ledgerBalance": 4250,
"updatedAt": "2026-03-01T10:00:00.000Z"
},
"requestId": "e3d4c5b6-0000-0000-0000-000000000000"
}{
"success": false,
"error": {
"message": "Invalid or revoked API key.",
"code": "INVALID_API_KEY",
"details": {}
},
"requestId": "a1b2c3d4-0000-0000-0000-000000000000"
}{
"success": false,
"error": {
"message": "Rate limit exceeded. Try again in 12 seconds.",
"code": "RATE_LIMIT_EXCEEDED",
"details": {
"limit": 60,
"remaining": 0,
"resetInSeconds": 12
}
},
"requestId": "a1b2c3d4-0000-0000-0000-000000000000"
}Know your balance before payments fail. Monitor this proactively.
These values are identical in most cases. They may differ briefly during high-throughput periods when multiple fee deductions are processing simultaneously.
Recommended approach:
Service wallet
The service wallet holds pre-funded tokens used to pay PalPluss transaction fees. A fee is deducted each time you initiate an STK Push or B2C payout. If balance reaches zero, payment requests return402 INSUFFICIENT_SERVICE_BALANCE — no payments process until you top up.
availableBalance vs ledgerBalance
| Field | Description |
|---|---|
availableBalance | Spendable balance after pending deductions. Use this for fee sufficiency checks. |
ledgerBalance | Total balance including pending items. |
Monitoring
curl https://api.palpluss.com/v1/wallets/service/balance \
-u "$PALPLUSS_API_KEY:"
- Check balance before each batch of payments
- Alert when balance drops below your minimum threshold (e.g. KES 500)
- Trigger an automated top-up or notify your team when the threshold is breached
Authorizations
Paste your PalPluss API key in the username field and leave the password field empty — it is ignored.
Get your key from console → Settings → API Keys (starts with pk_live_ or pk_test_).
In your own code, send the key directly:
Authorization: Basic YOUR_API_KEY