v3/get-unified-balance
curl --request POST \
--url https://sandbox.users.niobi.co/api/v3/get-unified-balance \
--header 'Content-Type: application/json' \
--data '
{
"client_id": "K1PoY1WYricSpXh6Wm24twnk6ecPJOWrHGsqiKJr",
"sender": "<string>",
"timestamp": 123,
"salt": "<string>",
"signature": "<string>",
"params": {
"wallet_account": 1234,
"currency": "KES"
}
}
'import requests
url = "https://sandbox.users.niobi.co/api/v3/get-unified-balance"
payload = {
"client_id": "K1PoY1WYricSpXh6Wm24twnk6ecPJOWrHGsqiKJr",
"sender": "<string>",
"timestamp": 123,
"salt": "<string>",
"signature": "<string>",
"params": {
"wallet_account": 1234,
"currency": "KES"
}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
client_id: 'K1PoY1WYricSpXh6Wm24twnk6ecPJOWrHGsqiKJr',
sender: '<string>',
timestamp: 123,
salt: '<string>',
signature: '<string>',
params: {wallet_account: 1234, currency: 'KES'}
})
};
fetch('https://sandbox.users.niobi.co/api/v3/get-unified-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://sandbox.users.niobi.co/api/v3/get-unified-balance",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'client_id' => 'K1PoY1WYricSpXh6Wm24twnk6ecPJOWrHGsqiKJr',
'sender' => '<string>',
'timestamp' => 123,
'salt' => '<string>',
'signature' => '<string>',
'params' => [
'wallet_account' => 1234,
'currency' => 'KES'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.users.niobi.co/api/v3/get-unified-balance"
payload := strings.NewReader("{\n \"client_id\": \"K1PoY1WYricSpXh6Wm24twnk6ecPJOWrHGsqiKJr\",\n \"sender\": \"<string>\",\n \"timestamp\": 123,\n \"salt\": \"<string>\",\n \"signature\": \"<string>\",\n \"params\": {\n \"wallet_account\": 1234,\n \"currency\": \"KES\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox.users.niobi.co/api/v3/get-unified-balance")
.header("Content-Type", "application/json")
.body("{\n \"client_id\": \"K1PoY1WYricSpXh6Wm24twnk6ecPJOWrHGsqiKJr\",\n \"sender\": \"<string>\",\n \"timestamp\": 123,\n \"salt\": \"<string>\",\n \"signature\": \"<string>\",\n \"params\": {\n \"wallet_account\": 1234,\n \"currency\": \"KES\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.users.niobi.co/api/v3/get-unified-balance")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"client_id\": \"K1PoY1WYricSpXh6Wm24twnk6ecPJOWrHGsqiKJr\",\n \"sender\": \"<string>\",\n \"timestamp\": 123,\n \"salt\": \"<string>\",\n \"signature\": \"<string>\",\n \"params\": {\n \"wallet_account\": 1234,\n \"currency\": \"KES\"\n }\n}"
response = http.request(request)
puts response.read_body{
"success": "true",
"message": "Balance fetched successfully.",
"data": [
"<string>"
]
}{
"success": "false",
"message": "User not found."
}{
"success": "false",
"message": "Entity integration record not found or Client id not matched or Request was not verified..",
"data": [
"<string>"
]
}{
"success": "false",
"message": "User not found."
}Account Balance
Get Account Balance
v3/get-unified-balance
POST
/
api
/
v3
/
get-unified-balance
v3/get-unified-balance
curl --request POST \
--url https://sandbox.users.niobi.co/api/v3/get-unified-balance \
--header 'Content-Type: application/json' \
--data '
{
"client_id": "K1PoY1WYricSpXh6Wm24twnk6ecPJOWrHGsqiKJr",
"sender": "<string>",
"timestamp": 123,
"salt": "<string>",
"signature": "<string>",
"params": {
"wallet_account": 1234,
"currency": "KES"
}
}
'import requests
url = "https://sandbox.users.niobi.co/api/v3/get-unified-balance"
payload = {
"client_id": "K1PoY1WYricSpXh6Wm24twnk6ecPJOWrHGsqiKJr",
"sender": "<string>",
"timestamp": 123,
"salt": "<string>",
"signature": "<string>",
"params": {
"wallet_account": 1234,
"currency": "KES"
}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
client_id: 'K1PoY1WYricSpXh6Wm24twnk6ecPJOWrHGsqiKJr',
sender: '<string>',
timestamp: 123,
salt: '<string>',
signature: '<string>',
params: {wallet_account: 1234, currency: 'KES'}
})
};
fetch('https://sandbox.users.niobi.co/api/v3/get-unified-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://sandbox.users.niobi.co/api/v3/get-unified-balance",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'client_id' => 'K1PoY1WYricSpXh6Wm24twnk6ecPJOWrHGsqiKJr',
'sender' => '<string>',
'timestamp' => 123,
'salt' => '<string>',
'signature' => '<string>',
'params' => [
'wallet_account' => 1234,
'currency' => 'KES'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.users.niobi.co/api/v3/get-unified-balance"
payload := strings.NewReader("{\n \"client_id\": \"K1PoY1WYricSpXh6Wm24twnk6ecPJOWrHGsqiKJr\",\n \"sender\": \"<string>\",\n \"timestamp\": 123,\n \"salt\": \"<string>\",\n \"signature\": \"<string>\",\n \"params\": {\n \"wallet_account\": 1234,\n \"currency\": \"KES\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox.users.niobi.co/api/v3/get-unified-balance")
.header("Content-Type", "application/json")
.body("{\n \"client_id\": \"K1PoY1WYricSpXh6Wm24twnk6ecPJOWrHGsqiKJr\",\n \"sender\": \"<string>\",\n \"timestamp\": 123,\n \"salt\": \"<string>\",\n \"signature\": \"<string>\",\n \"params\": {\n \"wallet_account\": 1234,\n \"currency\": \"KES\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.users.niobi.co/api/v3/get-unified-balance")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"client_id\": \"K1PoY1WYricSpXh6Wm24twnk6ecPJOWrHGsqiKJr\",\n \"sender\": \"<string>\",\n \"timestamp\": 123,\n \"salt\": \"<string>\",\n \"signature\": \"<string>\",\n \"params\": {\n \"wallet_account\": 1234,\n \"currency\": \"KES\"\n }\n}"
response = http.request(request)
puts response.read_body{
"success": "true",
"message": "Balance fetched successfully.",
"data": [
"<string>"
]
}{
"success": "false",
"message": "User not found."
}{
"success": "false",
"message": "Entity integration record not found or Client id not matched or Request was not verified..",
"data": [
"<string>"
]
}{
"success": "false",
"message": "User not found."
}Please make sure to generate a new
signature whenever you are creating a new balance request.Body
application/json
Payload required for initiating a Niobi payment transaction.
The Client id is your public key which is generated when you are creating a new API integration from our app
Example:
"K1PoY1WYricSpXh6Wm24twnk6ecPJOWrHGsqiKJr"
The Sender is the title of the API Integration which was created through our app. you can just copy this title and use it whenever making a new signature
this is the current timestamp when the request is being made
Salt is used for security purposes. This is a random string and can be unique value for each request or always the same.
this is the signature which was generated after signing the request. you can copy it from the response we provide from the api/niobi-signature endpoint
Show child attributes
Show child attributes
⌘I

