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": 1621851652617
}
'import requests
url = "https://staging-payments.commerce.asia/api/services/app/PaymentGateway/QueryWallets"
payload = {
"tenantId": 123,
"timestamp": 1621851652617
}
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: 1621851652617})
};
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' => 1621851652617
]),
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\": 1621851652617\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\": 1621851652617\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\": 1621851652617\n}"
response = http.request(request)
puts response.read_body{
"tenantId": 0,
"tenantName": "string",
"wallets": [
{
"currencyCode": "MYR",
"balance": 0,
"walletType": 0,
"walletStatus": 0
}
]
}PaymentGateway
Query Wallets
Inquiry the wallet balance.
The following input parameters are expected to be provided by the merchant to retrieve the wallet balances.
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": 1621851652617
}
'import requests
url = "https://staging-payments.commerce.asia/api/services/app/PaymentGateway/QueryWallets"
payload = {
"tenantId": 123,
"timestamp": 1621851652617
}
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: 1621851652617})
};
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' => 1621851652617
]),
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\": 1621851652617\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\": 1621851652617\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\": 1621851652617\n}"
response = http.request(request)
puts response.read_body{
"tenantId": 0,
"tenantName": "string",
"wallets": [
{
"currencyCode": "MYR",
"balance": 0,
"walletType": 0,
"walletStatus": 0
}
]
}Headers
Your unique Merchant ID assigned by CommercePay.
Your API credentials used for authentication (typically a Bearer token).
A unique security hash used to verify the integrity of the request body. See Generate Signature for how to generate this.
Body
application/json
