curl --request GET \
--url https://api-sandbox.uqpaytech.com/api/v2/payment/balances/{currency} \
--header 'x-auth-token: <api-key>' \
--header 'x-idempotency-key: <x-idempotency-key>'import requests
url = "https://api-sandbox.uqpaytech.com/api/v2/payment/balances/{currency}"
headers = {
"x-idempotency-key": "<x-idempotency-key>",
"x-auth-token": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-idempotency-key': '<x-idempotency-key>', 'x-auth-token': '<api-key>'}
};
fetch('https://api-sandbox.uqpaytech.com/api/v2/payment/balances/{currency}', 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-sandbox.uqpaytech.com/api/v2/payment/balances/{currency}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-auth-token: <api-key>",
"x-idempotency-key: <x-idempotency-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-sandbox.uqpaytech.com/api/v2/payment/balances/{currency}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-idempotency-key", "<x-idempotency-key>")
req.Header.Add("x-auth-token", "<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-sandbox.uqpaytech.com/api/v2/payment/balances/{currency}")
.header("x-idempotency-key", "<x-idempotency-key>")
.header("x-auth-token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.uqpaytech.com/api/v2/payment/balances/{currency}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-idempotency-key"] = '<x-idempotency-key>'
request["x-auth-token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"balance_id": "4a2dd9f0-bfe9-432b-be2e-4d5af5d0b448",
"currency": "SGD",
"available_balance": "1000.00",
"payable_balance": "950.00",
"pending_balance": "50.00",
"reserved_balance": "0.00",
"margin_balance": "0.00",
"frozen_balance": "0.00"
}Retrieve Balance
Retrieve the details of the specific individual currency account balance
curl --request GET \
--url https://api-sandbox.uqpaytech.com/api/v2/payment/balances/{currency} \
--header 'x-auth-token: <api-key>' \
--header 'x-idempotency-key: <x-idempotency-key>'import requests
url = "https://api-sandbox.uqpaytech.com/api/v2/payment/balances/{currency}"
headers = {
"x-idempotency-key": "<x-idempotency-key>",
"x-auth-token": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-idempotency-key': '<x-idempotency-key>', 'x-auth-token': '<api-key>'}
};
fetch('https://api-sandbox.uqpaytech.com/api/v2/payment/balances/{currency}', 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-sandbox.uqpaytech.com/api/v2/payment/balances/{currency}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-auth-token: <api-key>",
"x-idempotency-key: <x-idempotency-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-sandbox.uqpaytech.com/api/v2/payment/balances/{currency}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-idempotency-key", "<x-idempotency-key>")
req.Header.Add("x-auth-token", "<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-sandbox.uqpaytech.com/api/v2/payment/balances/{currency}")
.header("x-idempotency-key", "<x-idempotency-key>")
.header("x-auth-token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.uqpaytech.com/api/v2/payment/balances/{currency}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-idempotency-key"] = '<x-idempotency-key>'
request["x-auth-token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"balance_id": "4a2dd9f0-bfe9-432b-be2e-4d5af5d0b448",
"currency": "SGD",
"available_balance": "1000.00",
"payable_balance": "950.00",
"pending_balance": "50.00",
"reserved_balance": "0.00",
"margin_balance": "0.00",
"frozen_balance": "0.00"
}Authorizations
The API token for login provided by UQPAY.
Headers
Specifies the sub-account on whose behalf the request is made. This should be set to the account_id, which can be retrieved via the List Connected Accounts. If omitted or empty, the request is executed using the master account.
More information at Connected Accounts.
A unique identifier (UUID) used to maintain operation idempotency, ensuring that repeated executions of the same operation do not result in unintended effects or duplication. It helps preserve data consistency in the face of network errors, retries, or failures.
Path Parameters
Currency code for the balance query
"SGD"
Response
Balance retrieved successfully
Account balance ID
"4a2dd9f0-bfe9-432b-be2e-4d5af5d0b448"
Currency of the account balance
"SGD"
Current available balance
"1000.00"
Payable account balance
"950.00"
Pending balance
"50.00"
Reserved balance
"0.00"
Margin balance
"0.00"
Frozen funds
"0.00"

