Query Wallets
curl --request POST \
--url https://staging-payments.commerce.asia/api/services/app/PaymentGateway/QueryWallets \
--header 'Abp-TenantId: <abp-tenantid>' \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--header 'cap-signature: <cap-signature>' \
--data '
{
"tenantId": 123,
"timestamp": {}
}
'import requests
url = "https://staging-payments.commerce.asia/api/services/app/PaymentGateway/QueryWallets"
payload = {
"tenantId": 123,
"timestamp": {}
}
headers = {
"Abp-TenantId": "<abp-tenantid>",
"Authorization": "<authorization>",
"cap-signature": "<cap-signature>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Abp-TenantId': '<abp-tenantid>',
Authorization: '<authorization>',
'cap-signature': '<cap-signature>',
'Content-Type': 'application/json'
},
body: JSON.stringify({tenantId: 123, timestamp: {}})
};
fetch('https://staging-payments.commerce.asia/api/services/app/PaymentGateway/QueryWallets', 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://staging-payments.commerce.asia/api/services/app/PaymentGateway/QueryWallets",
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([
'tenantId' => 123,
'timestamp' => [
]
]),
CURLOPT_HTTPHEADER => [
"Abp-TenantId: <abp-tenantid>",
"Authorization: <authorization>",
"Content-Type: application/json",
"cap-signature: <cap-signature>"
],
]);
$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://staging-payments.commerce.asia/api/services/app/PaymentGateway/QueryWallets"
payload := strings.NewReader("{\n \"tenantId\": 123,\n \"timestamp\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Abp-TenantId", "<abp-tenantid>")
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("cap-signature", "<cap-signature>")
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://staging-payments.commerce.asia/api/services/app/PaymentGateway/QueryWallets")
.header("Abp-TenantId", "<abp-tenantid>")
.header("Authorization", "<authorization>")
.header("cap-signature", "<cap-signature>")
.header("Content-Type", "application/json")
.body("{\n \"tenantId\": 123,\n \"timestamp\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging-payments.commerce.asia/api/services/app/PaymentGateway/QueryWallets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Abp-TenantId"] = '<abp-tenantid>'
request["Authorization"] = '<authorization>'
request["cap-signature"] = '<cap-signature>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"tenantId\": 123,\n \"timestamp\": {}\n}"
response = http.request(request)
puts response.read_body{
"tenantId": 123,
"tenantName": "<string>",
"wallets": [
{
"wallets.id": {},
"wallets.currencyCode": "<string>",
"wallets.balance": 123,
"wallets.walletType": 123,
"wallets.walletStatus": 123
}
]
}Payout APIs
Query Wallets
Retrieve wallet balance, status, and related details.
POST
/
api
/
services
/
app
/
PaymentGateway
/
QueryWallets
Query Wallets
curl --request POST \
--url https://staging-payments.commerce.asia/api/services/app/PaymentGateway/QueryWallets \
--header 'Abp-TenantId: <abp-tenantid>' \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--header 'cap-signature: <cap-signature>' \
--data '
{
"tenantId": 123,
"timestamp": {}
}
'import requests
url = "https://staging-payments.commerce.asia/api/services/app/PaymentGateway/QueryWallets"
payload = {
"tenantId": 123,
"timestamp": {}
}
headers = {
"Abp-TenantId": "<abp-tenantid>",
"Authorization": "<authorization>",
"cap-signature": "<cap-signature>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Abp-TenantId': '<abp-tenantid>',
Authorization: '<authorization>',
'cap-signature': '<cap-signature>',
'Content-Type': 'application/json'
},
body: JSON.stringify({tenantId: 123, timestamp: {}})
};
fetch('https://staging-payments.commerce.asia/api/services/app/PaymentGateway/QueryWallets', 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://staging-payments.commerce.asia/api/services/app/PaymentGateway/QueryWallets",
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([
'tenantId' => 123,
'timestamp' => [
]
]),
CURLOPT_HTTPHEADER => [
"Abp-TenantId: <abp-tenantid>",
"Authorization: <authorization>",
"Content-Type: application/json",
"cap-signature: <cap-signature>"
],
]);
$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://staging-payments.commerce.asia/api/services/app/PaymentGateway/QueryWallets"
payload := strings.NewReader("{\n \"tenantId\": 123,\n \"timestamp\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Abp-TenantId", "<abp-tenantid>")
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("cap-signature", "<cap-signature>")
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://staging-payments.commerce.asia/api/services/app/PaymentGateway/QueryWallets")
.header("Abp-TenantId", "<abp-tenantid>")
.header("Authorization", "<authorization>")
.header("cap-signature", "<cap-signature>")
.header("Content-Type", "application/json")
.body("{\n \"tenantId\": 123,\n \"timestamp\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging-payments.commerce.asia/api/services/app/PaymentGateway/QueryWallets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Abp-TenantId"] = '<abp-tenantid>'
request["Authorization"] = '<authorization>'
request["cap-signature"] = '<cap-signature>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"tenantId\": 123,\n \"timestamp\": {}\n}"
response = http.request(request)
puts response.read_body{
"tenantId": 123,
"tenantName": "<string>",
"wallets": [
{
"wallets.id": {},
"wallets.currencyCode": "<string>",
"wallets.balance": 123,
"wallets.walletType": 123,
"wallets.walletStatus": 123
}
]
}Used to retrieve wallet information, including wallet balance, status, and other related details.
Request
Headers
string
required
Your unique Merchant ID assigned by CommercePay.
string
required
Your API credentials used for authentication (typically a Bearer token).
string
required
A unique security hash used to verify the integrity of the request body. See Generate Signature for how to generate this.
Body
integer
required
Your unique Merchant ID assigned by CommercePay.
int64
required
Numeric timestamp in milliseconds representing request validation freshness, generated via
new Date().getTime(). Example: 1621851652617.Request Payload Sample
Payload
{
"tenantId": 14,
"timestamp": 1621851652617
}
Response
Body
integer
Your unique Merchant ID assigned by CommercePay.
string
Merchant name.
object[]
Response Payload Sample
Response_2XX
{
"result": {
"tenantId": 14,
"tenantName": "CAPTest",
"wallets": [
{
"id": 4,
"currencyCode": "MYR",
"balance": 5253.6,
"walletType": 2,
"walletStatus": 1
}
]
}
}
Error Responses
| Code | Message |
|---|---|
| 1005 | Tenant Wallet Not Found |
| 1 | Invalid Signature. |
Response_400
{
"result": null,
"error": {
"code": 1005,
"message": "Tenant Wallet Not Found"
}
}
Response_400
{
"result": {
"code": 1,
"message": "Invalid Signature."
},
"error": null
}
