Check credit balance
curl --request GET \
--url https://apitopup.beem.africa/v1/credit-balance \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://apitopup.beem.africa/v1/credit-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://apitopup.beem.africa/v1/credit-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://apitopup.beem.africa/v1/credit-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://apitopup.beem.africa/v1/credit-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://apitopup.beem.africa/v1/credit-balance")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apitopup.beem.africa/v1/credit-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{
"data": {
"credit_bal": "<string>",
"credit_level": "<string>",
"sms_reminder": true,
"email_reminder": true,
"allow_postpaid_limit": true,
"postpaid_limit": "<string>",
"moja_session_expiry": "<string>"
}
}API Reference
Check credit balance
Retrieve available credit balance for a product. Set app_name to AIRTIME, USSD, BPAY, or another registered product name.
GET
/
credit-balance
Check credit balance
curl --request GET \
--url https://apitopup.beem.africa/v1/credit-balance \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://apitopup.beem.africa/v1/credit-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://apitopup.beem.africa/v1/credit-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://apitopup.beem.africa/v1/credit-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://apitopup.beem.africa/v1/credit-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://apitopup.beem.africa/v1/credit-balance")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apitopup.beem.africa/v1/credit-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{
"data": {
"credit_bal": "<string>",
"credit_level": "<string>",
"sms_reminder": true,
"email_reminder": true,
"allow_postpaid_limit": true,
"postpaid_limit": "<string>",
"moja_session_expiry": "<string>"
}
}Authorizations
basicAuthaccessToken
Beem API credentials: API key as username, API secret as password.
Query Parameters
Product identifier. Use AIRTIME for Airtime API, USSD for USSD billing, BPAY for payments.
Available options:
AIRTIME, USSD, BPAY, SMS, OTP, CHAT, BROADCAST, EMG, MOJA Admin only — query balance for another user
Optional ISO country code filter
Optional ISO currency code filter
Response
Successful response
Show child attributes
Show child attributes
⌘I
