跳转到主要内容
POST
/
v1
/
pay
/
address
/
refund
直付订单退款
curl --request POST \
  --url https://api.example.com/v1/pay/address/refund \
  --header 'Content-Type: application/json' \
  --header 'X-GatePay-Certificate-ClientId: <x-gatepay-certificate-clientid>' \
  --header 'X-GatePay-Nonce: <x-gatepay-nonce>' \
  --header 'X-GatePay-Signature: <x-gatepay-signature>' \
  --header 'X-GatePay-Timestamp: <x-gatepay-timestamp>' \
  --data '
{
  "refundRequestId": "483902480932841787",
  "prepayId": "1665553233227833",
  "refundAmount": "20",
  "refundReason": "test refund function",
  "receiverId": 598816
}
'
{
  "refundRequestId": "483902480932841787",
  "prepayId": "1665553233227833",
  "orderAmount": "14.9",
  "refundAmount": "4.9"
}
API描述:对直付地址支付单发起退款,只支持直付地址支付单,若提供的参数对应到闪兑支付单,会返回错误

请求头

X-GatePay-Certificate-ClientId
string
必填

商户客户端ID

示例:

"4186d0c6-6a35-55a9-8dc6-5312769dbff8"

X-GatePay-Signature
string
必填

签名

示例:

"672d5650dcc9bb22ebf25fa16c28d03c0e159d742a9176d4340a5da326d75dc8"

X-GatePay-Timestamp
string
必填

时间戳(毫秒)

示例:

"1672905655498"

X-GatePay-Nonce
string
必填

随机数

示例:

"9578"

请求体

application/json
refundRequestId
string

商户请求退款编号

prepayId
string

对应支付单订单id

refundAmount
string

退款金额

refundReason
string

退款原因

receiverId
string

地址支付退款接收人在gate系统的user_id

响应

200 - application/json

成功响应

直付地址支付单退款响应

refundRequestId
string
必填

商户退款请求ID

prepayId
string
必填

拟退款的订单id

orderAmount
string
必填

订单金额

refundAmount
string
必填

退款金额