curl --request GET \
--url https://staging-payments.commerce.asia/api/services/app/Channel/GetTenantChannelsByCountry \
--header 'Abp-TenantId: <abp-tenantid>' \
--header 'Authorization: <authorization>' \
--header 'cap-signature: <cap-signature>'import requests
url = "https://staging-payments.commerce.asia/api/services/app/Channel/GetTenantChannelsByCountry"
headers = {
"Abp-TenantId": "<abp-tenantid>",
"Authorization": "<authorization>",
"cap-signature": "<cap-signature>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'Abp-TenantId': '<abp-tenantid>',
Authorization: '<authorization>',
'cap-signature': '<cap-signature>'
}
};
fetch('https://staging-payments.commerce.asia/api/services/app/Channel/GetTenantChannelsByCountry', 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/Channel/GetTenantChannelsByCountry",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Abp-TenantId: <abp-tenantid>",
"Authorization: <authorization>",
"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"
"net/http"
"io"
)
func main() {
url := "https://staging-payments.commerce.asia/api/services/app/Channel/GetTenantChannelsByCountry"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Abp-TenantId", "<abp-tenantid>")
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("cap-signature", "<cap-signature>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://staging-payments.commerce.asia/api/services/app/Channel/GetTenantChannelsByCountry")
.header("Abp-TenantId", "<abp-tenantid>")
.header("Authorization", "<authorization>")
.header("cap-signature", "<cap-signature>")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging-payments.commerce.asia/api/services/app/Channel/GetTenantChannelsByCountry")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Abp-TenantId"] = '<abp-tenantid>'
request["Authorization"] = '<authorization>'
request["cap-signature"] = '<cap-signature>'
response = http.request(request)
puts response.read_body[
{
"id": 2,
"name": "FPX",
"type": 1,
"refundType": 0,
"isProviderHostChannel": true,
"currencies": [
{
"acceptedCurrencyCode": "MYR",
"minRequestAmount": null,
"maxRequestAmount": null,
"dailyTransactionCount": null,
"dailyTransactionAmount": null,
"minSurchargeAmount": null,
"maxSurchargeAmount": null,
"isSurchargePercentage": null,
"surcharge": null
}
],
"imageUrl": "https://commerceasiapayment.blob.core.windows.net/image/payment/channel/2/2.png",
"groupId": null,
"groupName": null,
"groupImageUrl": null
}
]Get Channel List
The following input parameters are expected to be provided by the merchant to retrieve available channels by country code.
curl --request GET \
--url https://staging-payments.commerce.asia/api/services/app/Channel/GetTenantChannelsByCountry \
--header 'Abp-TenantId: <abp-tenantid>' \
--header 'Authorization: <authorization>' \
--header 'cap-signature: <cap-signature>'import requests
url = "https://staging-payments.commerce.asia/api/services/app/Channel/GetTenantChannelsByCountry"
headers = {
"Abp-TenantId": "<abp-tenantid>",
"Authorization": "<authorization>",
"cap-signature": "<cap-signature>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'Abp-TenantId': '<abp-tenantid>',
Authorization: '<authorization>',
'cap-signature': '<cap-signature>'
}
};
fetch('https://staging-payments.commerce.asia/api/services/app/Channel/GetTenantChannelsByCountry', 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/Channel/GetTenantChannelsByCountry",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Abp-TenantId: <abp-tenantid>",
"Authorization: <authorization>",
"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"
"net/http"
"io"
)
func main() {
url := "https://staging-payments.commerce.asia/api/services/app/Channel/GetTenantChannelsByCountry"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Abp-TenantId", "<abp-tenantid>")
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("cap-signature", "<cap-signature>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://staging-payments.commerce.asia/api/services/app/Channel/GetTenantChannelsByCountry")
.header("Abp-TenantId", "<abp-tenantid>")
.header("Authorization", "<authorization>")
.header("cap-signature", "<cap-signature>")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging-payments.commerce.asia/api/services/app/Channel/GetTenantChannelsByCountry")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Abp-TenantId"] = '<abp-tenantid>'
request["Authorization"] = '<authorization>'
request["cap-signature"] = '<cap-signature>'
response = http.request(request)
puts response.read_body[
{
"id": 2,
"name": "FPX",
"type": 1,
"refundType": 0,
"isProviderHostChannel": true,
"currencies": [
{
"acceptedCurrencyCode": "MYR",
"minRequestAmount": null,
"maxRequestAmount": null,
"dailyTransactionCount": null,
"dailyTransactionAmount": null,
"minSurchargeAmount": null,
"maxSurchargeAmount": null,
"isSurchargePercentage": null,
"surcharge": null
}
],
"imageUrl": "https://commerceasiapayment.blob.core.windows.net/image/payment/channel/2/2.png",
"groupId": null,
"groupName": null,
"groupImageUrl": null
}
]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.
Query Parameters
Country code with 2-letter of ISO Alpha-2 standard
2"MY"
Response
Success
An identifier that represents CommercePay channel.
Channel Name
Channel Type: [1= OnlinePayment, 2= OnlinePayout, 3= OnlineRecurringPayment]
1, 2 Channel Support Refund Type: [0= UnSupported Refund, 1= Only Full Refund, 2= Full Refund And Partial Refund]
0, 1, 2 If "isProviderHostChannel" is indicated as true, it means that the provider has its own one or more hosted channels. To get provider channels, merchants are required to call the endpoint: /api/services/app/Channel/GetProviderChannels.
Show child attributes
Show child attributes
Url image of Payment Provider channel
Availability to save user info for subsequent payments
