Retrieve Balance
curl --request GET \
--url https://api-sandbox.uqpaytech.com/api/v2/payment/balances/{currency} \
--header 'x-auth-token: <api-key>'import requests
url = "https://api-sandbox.uqpaytech.com/api/v2/payment/balances/{currency}"
headers = {"x-auth-token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'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>"
],
]);
$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-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-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-auth-token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"balance_id": "e2417037-ea75-4d92-b2f4-2d83b4022a90",
"currency": "CNY",
"available_balance": "0",
"payable_balance": "0",
"pending_balance": "0",
"reserved_balance": "0",
"margin_balance": "0",
"frozen_balance": "0"
}Payment Balances
Retrieve Balance
Retrieve the acquiring balance for a specified currency.
GET
/
v2
/
payment
/
balances
/
{currency}
Retrieve Balance
curl --request GET \
--url https://api-sandbox.uqpaytech.com/api/v2/payment/balances/{currency} \
--header 'x-auth-token: <api-key>'import requests
url = "https://api-sandbox.uqpaytech.com/api/v2/payment/balances/{currency}"
headers = {"x-auth-token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'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>"
],
]);
$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-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-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-auth-token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"balance_id": "e2417037-ea75-4d92-b2f4-2d83b4022a90",
"currency": "CNY",
"available_balance": "0",
"payable_balance": "0",
"pending_balance": "0",
"reserved_balance": "0",
"margin_balance": "0",
"frozen_balance": "0"
}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.
Path Parameters
Currency code for the balance query
Example:
"SGD"
Response
200 - application/json
Balance retrieved successfully
Account balance ID
Example:
"4a2dd9f0-bfe9-432b-be2e-4d5af5d0b448"
Currency of the account balance
Example:
"SGD"
Current available balance
Example:
"1000.00"
Payable account balance
Example:
"950.00"
Pending balance
Example:
"50.00"
Reserved balance
Example:
"0.00"
Margin balance
Example:
"0.00"
Frozen funds
Example:
"0.00"

