查询退款详情
curl --request GET \
--url https://openplatform.gateapi.io/payment/open/institution/v2/pay/refund/details \
--header 'X-GatePay-Certificate-ClientId: <x-gatepay-certificate-clientid>' \
--header 'X-GatePay-Nonce: <x-gatepay-nonce>' \
--header 'X-GatePay-On-Behalf-Of: <x-gatepay-on-behalf-of>' \
--header 'X-GatePay-Signature: <x-gatepay-signature>' \
--header 'X-GatePay-Timestamp: <x-gatepay-timestamp>'import requests
url = "https://openplatform.gateapi.io/payment/open/institution/v2/pay/refund/details"
headers = {
"X-GatePay-Certificate-ClientId": "<x-gatepay-certificate-clientid>",
"X-GatePay-Signature": "<x-gatepay-signature>",
"X-GatePay-Timestamp": "<x-gatepay-timestamp>",
"X-GatePay-Nonce": "<x-gatepay-nonce>",
"X-GatePay-On-Behalf-Of": "<x-gatepay-on-behalf-of>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'X-GatePay-Certificate-ClientId': '<x-gatepay-certificate-clientid>',
'X-GatePay-Signature': '<x-gatepay-signature>',
'X-GatePay-Timestamp': '<x-gatepay-timestamp>',
'X-GatePay-Nonce': '<x-gatepay-nonce>',
'X-GatePay-On-Behalf-Of': '<x-gatepay-on-behalf-of>'
}
};
fetch('https://openplatform.gateapi.io/payment/open/institution/v2/pay/refund/details', 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://openplatform.gateapi.io/payment/open/institution/v2/pay/refund/details",
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-GatePay-Certificate-ClientId: <x-gatepay-certificate-clientid>",
"X-GatePay-Nonce: <x-gatepay-nonce>",
"X-GatePay-On-Behalf-Of: <x-gatepay-on-behalf-of>",
"X-GatePay-Signature: <x-gatepay-signature>",
"X-GatePay-Timestamp: <x-gatepay-timestamp>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.get("https://openplatform.gateapi.io/payment/open/institution/v2/pay/refund/details")
.header("X-GatePay-Certificate-ClientId", "<x-gatepay-certificate-clientid>")
.header("X-GatePay-Signature", "<x-gatepay-signature>")
.header("X-GatePay-Timestamp", "<x-gatepay-timestamp>")
.header("X-GatePay-Nonce", "<x-gatepay-nonce>")
.header("X-GatePay-On-Behalf-Of", "<x-gatepay-on-behalf-of>")
.asString();package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://openplatform.gateapi.io/payment/open/institution/v2/pay/refund/details"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-GatePay-Certificate-ClientId", "<x-gatepay-certificate-clientid>")
req.Header.Add("X-GatePay-Signature", "<x-gatepay-signature>")
req.Header.Add("X-GatePay-Timestamp", "<x-gatepay-timestamp>")
req.Header.Add("X-GatePay-Nonce", "<x-gatepay-nonce>")
req.Header.Add("X-GatePay-On-Behalf-Of", "<x-gatepay-on-behalf-of>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://openplatform.gateapi.io/payment/open/institution/v2/pay/refund/details")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-GatePay-Certificate-ClientId"] = '<x-gatepay-certificate-clientid>'
request["X-GatePay-Signature"] = '<x-gatepay-signature>'
request["X-GatePay-Timestamp"] = '<x-gatepay-timestamp>'
request["X-GatePay-Nonce"] = '<x-gatepay-nonce>'
request["X-GatePay-On-Behalf-Of"] = '<x-gatepay-on-behalf-of>'
response = http.request(request)
puts response.read_body{
"status": "SUCCESS",
"code": "000000",
"errorMessage": "",
"data": {
"refundRequestId": "202508271923022",
"gateRefundId": "1991045981847818240",
"refundId": "1991045981847818240",
"orderId": "35214673103159414",
"merchantTradeNo": "163",
"createTime": 1724769600000,
"transactTime": 1724769660000,
"transactionId": "1991045981847818241",
"txHash": "0x1234...",
"orderAmount": "10",
"orderCurrency": "USDT",
"requestAmount": "0.018",
"requestCurrency": "USDT",
"amount": "0.018",
"currency": "USDT",
"status": "SUCCESS",
"remark": "bourne-test",
"refund_style": 2,
"refund_pay_channel": 1,
"refund_address": "0x86608d3C9f979b98a3b2417216eD859d313E339D",
"refund_chain": "ETH",
"refund_bear_type": 1,
"refund_amount_type": 2,
"refund_account_type": 1,
"refund_gas_amount": "0.001",
"refund_fail_reason": "",
"refund_to_gate_uid": 10002,
"channelId": "123456",
"nickName": "testUser",
"payerId": 10001,
"fromAddress": "0x1234...",
"payChannel": "1",
"billType": 1,
"goodsName": "charge",
"totalRequestAmount": "0.018",
"totalRequestCurrency": "USDT",
"totalReceiveAmount": "0.018",
"totalReceiveCurrency": "USDT",
"refundDetails": [
{
"transactionId": "1991045981847818241",
"transactTime": 1724769660000,
"payChannel": "1",
"status": "SUCCESS",
"amount": "0.018",
"currency": "USDT",
"chain": "ETH",
"address": "0x86608d3C9f979b98a3b2417216eD859d313E339D",
"hash": "0x1234...",
"remark": "",
"billType": 1
}
]
}
}退款
查询退款详情
根据商户退款单id查询退款详情。
GET
/
payment
/
open
/
institution
/
v2
/
pay
/
refund
/
details
查询退款详情
curl --request GET \
--url https://openplatform.gateapi.io/payment/open/institution/v2/pay/refund/details \
--header 'X-GatePay-Certificate-ClientId: <x-gatepay-certificate-clientid>' \
--header 'X-GatePay-Nonce: <x-gatepay-nonce>' \
--header 'X-GatePay-On-Behalf-Of: <x-gatepay-on-behalf-of>' \
--header 'X-GatePay-Signature: <x-gatepay-signature>' \
--header 'X-GatePay-Timestamp: <x-gatepay-timestamp>'import requests
url = "https://openplatform.gateapi.io/payment/open/institution/v2/pay/refund/details"
headers = {
"X-GatePay-Certificate-ClientId": "<x-gatepay-certificate-clientid>",
"X-GatePay-Signature": "<x-gatepay-signature>",
"X-GatePay-Timestamp": "<x-gatepay-timestamp>",
"X-GatePay-Nonce": "<x-gatepay-nonce>",
"X-GatePay-On-Behalf-Of": "<x-gatepay-on-behalf-of>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'X-GatePay-Certificate-ClientId': '<x-gatepay-certificate-clientid>',
'X-GatePay-Signature': '<x-gatepay-signature>',
'X-GatePay-Timestamp': '<x-gatepay-timestamp>',
'X-GatePay-Nonce': '<x-gatepay-nonce>',
'X-GatePay-On-Behalf-Of': '<x-gatepay-on-behalf-of>'
}
};
fetch('https://openplatform.gateapi.io/payment/open/institution/v2/pay/refund/details', 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://openplatform.gateapi.io/payment/open/institution/v2/pay/refund/details",
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-GatePay-Certificate-ClientId: <x-gatepay-certificate-clientid>",
"X-GatePay-Nonce: <x-gatepay-nonce>",
"X-GatePay-On-Behalf-Of: <x-gatepay-on-behalf-of>",
"X-GatePay-Signature: <x-gatepay-signature>",
"X-GatePay-Timestamp: <x-gatepay-timestamp>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.get("https://openplatform.gateapi.io/payment/open/institution/v2/pay/refund/details")
.header("X-GatePay-Certificate-ClientId", "<x-gatepay-certificate-clientid>")
.header("X-GatePay-Signature", "<x-gatepay-signature>")
.header("X-GatePay-Timestamp", "<x-gatepay-timestamp>")
.header("X-GatePay-Nonce", "<x-gatepay-nonce>")
.header("X-GatePay-On-Behalf-Of", "<x-gatepay-on-behalf-of>")
.asString();package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://openplatform.gateapi.io/payment/open/institution/v2/pay/refund/details"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-GatePay-Certificate-ClientId", "<x-gatepay-certificate-clientid>")
req.Header.Add("X-GatePay-Signature", "<x-gatepay-signature>")
req.Header.Add("X-GatePay-Timestamp", "<x-gatepay-timestamp>")
req.Header.Add("X-GatePay-Nonce", "<x-gatepay-nonce>")
req.Header.Add("X-GatePay-On-Behalf-Of", "<x-gatepay-on-behalf-of>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://openplatform.gateapi.io/payment/open/institution/v2/pay/refund/details")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-GatePay-Certificate-ClientId"] = '<x-gatepay-certificate-clientid>'
request["X-GatePay-Signature"] = '<x-gatepay-signature>'
request["X-GatePay-Timestamp"] = '<x-gatepay-timestamp>'
request["X-GatePay-Nonce"] = '<x-gatepay-nonce>'
request["X-GatePay-On-Behalf-Of"] = '<x-gatepay-on-behalf-of>'
response = http.request(request)
puts response.read_body{
"status": "SUCCESS",
"code": "000000",
"errorMessage": "",
"data": {
"refundRequestId": "202508271923022",
"gateRefundId": "1991045981847818240",
"refundId": "1991045981847818240",
"orderId": "35214673103159414",
"merchantTradeNo": "163",
"createTime": 1724769600000,
"transactTime": 1724769660000,
"transactionId": "1991045981847818241",
"txHash": "0x1234...",
"orderAmount": "10",
"orderCurrency": "USDT",
"requestAmount": "0.018",
"requestCurrency": "USDT",
"amount": "0.018",
"currency": "USDT",
"status": "SUCCESS",
"remark": "bourne-test",
"refund_style": 2,
"refund_pay_channel": 1,
"refund_address": "0x86608d3C9f979b98a3b2417216eD859d313E339D",
"refund_chain": "ETH",
"refund_bear_type": 1,
"refund_amount_type": 2,
"refund_account_type": 1,
"refund_gas_amount": "0.001",
"refund_fail_reason": "",
"refund_to_gate_uid": 10002,
"channelId": "123456",
"nickName": "testUser",
"payerId": 10001,
"fromAddress": "0x1234...",
"payChannel": "1",
"billType": 1,
"goodsName": "charge",
"totalRequestAmount": "0.018",
"totalRequestCurrency": "USDT",
"totalReceiveAmount": "0.018",
"totalReceiveCurrency": "USDT",
"refundDetails": [
{
"transactionId": "1991045981847818241",
"transactTime": 1724769660000,
"payChannel": "1",
"status": "SUCCESS",
"amount": "0.018",
"currency": "USDT",
"chain": "ETH",
"address": "0x86608d3C9f979b98a3b2417216eD859d313E339D",
"hash": "0x1234...",
"remark": "",
"billType": 1
}
]
}
}概述
本页说明GET /payment/open/institution/v2/pay/refund/details 接口。完整的请求参数、响应结构与示例由上方关联的 OpenAPI 定义渲染。
说明
- 认证方式使用 GatePay 标准签名请求头。
- 本页展示同一接口的机构路径版本。
- 除创建子账户、查询子账户详情、分页查询子账户外,机构侧请求需携带
X-GatePay-On-Behalf-Of。 - 通用签名规则请参见 /api-reference/version/100/cn/common/securityAndSignature。
请求头
商户客户端ID
示例:
"mZ96D37oKk-HrWJc"
签名
毫秒级时间戳,与服务端时间偏差不得超过30秒
示例:
"1695611256106"
随机数
示例:
"1260554069"
必填代理归属请求头。请填写本次请求的发起方账户 ID;在机构代理商户 API 中通常填写目标子账户 ID,在机构代扣与划转接口中可填写机构账户 ID 或子账户 ID。
查询参数
商户生成的退款单id
示例:
"202508271923022"
⌘I

