Query Refund Payment
curl --request GET \
--url https://staging-payments.commerce.asia/api/services/app/PaymentGateway/QueryRefund \
--header 'Abp-TenantId: <abp-tenantid>' \
--header 'Authorization: <authorization>' \
--header 'cap-signature: <cap-signature>'import requests
url = "https://staging-payments.commerce.asia/api/services/app/PaymentGateway/QueryRefund"
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/PaymentGateway/QueryRefund', 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/QueryRefund",
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/PaymentGateway/QueryRefund"
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/PaymentGateway/QueryRefund")
.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/PaymentGateway/QueryRefund")
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{
"tenantId": 123,
"transactionNumber": "<string>",
"paymentSessionNumber": "<string>",
"refundTransactionNumber": "<string>",
"referenceCode": "<string>",
"amount": 123,
"currencyCode": "<string>",
"refundStatus": 123,
"refundPaymentList": [
{
"transactionNumber": "<string>",
"amount": 123,
"currencyCode": "<string>",
"refundReason": "<string>",
"refundStatus": 123
}
],
"responseMessage": "<string>"
}Refund APIs
Query Refund Payment
The payment gateway requests a query refund payment status
GET
/
api
/
services
/
app
/
PaymentGateway
/
QueryRefund
Query Refund Payment
curl --request GET \
--url https://staging-payments.commerce.asia/api/services/app/PaymentGateway/QueryRefund \
--header 'Abp-TenantId: <abp-tenantid>' \
--header 'Authorization: <authorization>' \
--header 'cap-signature: <cap-signature>'import requests
url = "https://staging-payments.commerce.asia/api/services/app/PaymentGateway/QueryRefund"
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/PaymentGateway/QueryRefund', 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/QueryRefund",
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/PaymentGateway/QueryRefund"
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/PaymentGateway/QueryRefund")
.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/PaymentGateway/QueryRefund")
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{
"tenantId": 123,
"transactionNumber": "<string>",
"paymentSessionNumber": "<string>",
"refundTransactionNumber": "<string>",
"referenceCode": "<string>",
"amount": 123,
"currencyCode": "<string>",
"refundStatus": 123,
"refundPaymentList": [
{
"transactionNumber": "<string>",
"amount": 123,
"currencyCode": "<string>",
"refundReason": "<string>",
"refundStatus": 123
}
],
"responseMessage": "<string>"
}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
Unique CAP Transaction Number
Maximum string length:
24new Date().getTime()
Example:
1621851652617
