Get account balance
curl --request GET \
--url https://api-partner.onecluster.co/api/v1/accounts/{accountNumber} \
--header 'Authorization: <api-key>'import requests
url = "https://api-partner.onecluster.co/api/v1/accounts/{accountNumber}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api-partner.onecluster.co/api/v1/accounts/{accountNumber}', 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-partner.onecluster.co/api/v1/accounts/{accountNumber}",
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: <api-key>"
],
]);
$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-partner.onecluster.co/api/v1/accounts/{accountNumber}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
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-partner.onecluster.co/api/v1/accounts/{accountNumber}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-partner.onecluster.co/api/v1/accounts/{accountNumber}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"responseCode": "00",
"message": "Balance retrieved",
"data": {
"accountNumber": "0123456789",
"bankCode": "032",
"bankName": "Union Bank of Nigeria",
"availableBalance": 150000,
"ledgerBalance": 150000,
"currency": "NGN",
"asAt": "2026-03-25T10:00:00+01:00"
}
}{
"type": "https://api.onecluster.co/errors/insufficient-funds",
"title": "Insufficient Funds",
"status": 422,
"detail": "The account balance is ₦0.00. You need at least ₦50,000.00 to complete this transfer.",
"instance": "/api/v1/payments/transfer",
"correlationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"code": "INSUFFICIENT_FUNDS"
}{
"type": "https://api.onecluster.co/errors/insufficient-funds",
"title": "Insufficient Funds",
"status": 422,
"detail": "The account balance is ₦0.00. You need at least ₦50,000.00 to complete this transfer.",
"instance": "/api/v1/payments/transfer",
"correlationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"code": "INSUFFICIENT_FUNDS"
}Accounts Endpoints
Get Account Balance
Returns the current balance and details for a virtual account.
GET
/
api
/
v1
/
accounts
/
{accountNumber}
Get account balance
curl --request GET \
--url https://api-partner.onecluster.co/api/v1/accounts/{accountNumber} \
--header 'Authorization: <api-key>'import requests
url = "https://api-partner.onecluster.co/api/v1/accounts/{accountNumber}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api-partner.onecluster.co/api/v1/accounts/{accountNumber}', 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-partner.onecluster.co/api/v1/accounts/{accountNumber}",
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: <api-key>"
],
]);
$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-partner.onecluster.co/api/v1/accounts/{accountNumber}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
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-partner.onecluster.co/api/v1/accounts/{accountNumber}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-partner.onecluster.co/api/v1/accounts/{accountNumber}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"responseCode": "00",
"message": "Balance retrieved",
"data": {
"accountNumber": "0123456789",
"bankCode": "032",
"bankName": "Union Bank of Nigeria",
"availableBalance": 150000,
"ledgerBalance": 150000,
"currency": "NGN",
"asAt": "2026-03-25T10:00:00+01:00"
}
}{
"type": "https://api.onecluster.co/errors/insufficient-funds",
"title": "Insufficient Funds",
"status": 422,
"detail": "The account balance is ₦0.00. You need at least ₦50,000.00 to complete this transfer.",
"instance": "/api/v1/payments/transfer",
"correlationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"code": "INSUFFICIENT_FUNDS"
}{
"type": "https://api.onecluster.co/errors/insufficient-funds",
"title": "Insufficient Funds",
"status": 422,
"detail": "The account balance is ₦0.00. You need at least ₦50,000.00 to complete this transfer.",
"instance": "/api/v1/payments/transfer",
"correlationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"code": "INSUFFICIENT_FUNDS"
}Authorizations
Your API key, formatted as: ApiKey ubn_sb_your_key_here
- Sandbox keys start with
ubn_sb_ - Production keys start with
ubn_pk_ - Never use production keys during testing, they will charge real money
Headers
A UUID v4 you generate to trace this request through our systems. If you don't provide one, we generate it for you. Always include it in support requests, it helps us find your request in logs.
Example:
"7f3a9c21-4e8b-4a12-b6d1-3c8a7f2e1b09"
Path Parameters
The 10-digit virtual account number
Example:
"0123456789"
Response
Account balance
Standard response wrapper for all successful API calls
Always true for successful responses
Example:
true
00 means success
Example:
"00"
Human-readable description of the result
Example:
"Request processed successfully"
The actual response data (varies by endpoint)
Show child attributes
Show child attributes

