跳转到主要内容
POST
/
payment
/
open
/
institution
/
v2
/
standard
/
order
/
refund
发起退款
curl --request POST \
  --url https://openplatform.gateapi.io/payment/open/institution/v2/standard/order/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-On-Behalf-Of: <x-gatepay-on-behalf-of>' \
  --header 'X-GatePay-Signature: <x-gatepay-signature>' \
  --header 'X-GatePay-Timestamp: <x-gatepay-timestamp>' \
  --data '
{
  "prepayId": "35214673103159414",
  "refundRequestId": "202508271923022",
  "refundAmount": "0.018",
  "refundReason": "bourne-test"
}
'
{
  "code": "000000",
  "data": {
    "refundRequestId": "202508271923022",
    "refundGateId": "1991045981847818240",
    "prepayId": "35214673103159414",
    "orderAmount": "10",
    "refundAmount": "0.018",
    "errMsg": "",
    "orderCurrency": "USDT",
    "payCurrency": "USDT",
    "payAmount": "0.018"
  },
  "status": "SUCCESS",
  "errorMessage": ""
}

Documentation Index

Fetch the complete documentation index at: https://docs.gate.com/llms.txt

Use this file to discover all available pages before exploring further.

概述

本页说明 POST /payment/open/institution/v2/standard/order/refund 接口。完整的请求参数、响应结构与示例由上方关联的 OpenAPI 定义渲染。

说明

  • 认证方式使用 GatePay 标准签名请求头。
  • 本页展示同一接口的机构路径版本。
  • 除创建子账户、查询子账户详情、分页查询子账户外,机构侧请求需携带 X-GatePay-On-Behalf-Of
  • refundRequestId 是商户侧退款请求唯一标识,查询退款详情时请使用该字段。
  • refundBearTyperefundAmountTypeFull 按数值枚举传入。
  • 商户后台手工发起的退款进度以后台展示为准,不应与 API 回调行为混为一谈。
  • 对退款实现,建议同时保存 refundRequestId、原订单业务标识与查询结果,方便后续对账。
  • 通用签名规则请参见 /api-reference/version/100/cn/common/securityAndSignature

请求头

X-GatePay-Certificate-ClientId
string
必填

商户客户端ID

示例:

"mZ96D37oKk-HrWJc"

X-GatePay-Signature
string
必填

签名

X-GatePay-Timestamp
string
必填

时间戳(毫秒)

示例:

"1695611256106"

X-GatePay-Nonce
string
必填

随机数

示例:

"1260554069"

X-GatePay-On-Behalf-Of
string
必填

必填代理归属请求头。请填写本次请求的发起方账户 ID;在机构代理商户 API 中通常填写目标子账户 ID,在机构代扣与划转接口中可填写机构账户 ID 或子账户 ID。

请求体

application/json

发起退款 请求参数

refundRequestId
string
必填

商户退款ID

示例:

"202508271923022"

prepayId
string
必填

订单ID

示例:

"35214673103159414"

refundAmount
string
必填

退款金额

示例:

"0.018"

refundReason
string
必填

退款原因

示例:

"bourne-test"

refundStyle
integer<int64>

退款方式 1:原路退 2:指定退

refundPayChannel
integer<int64>

退款支付方式 1:Gate 2:Web3

refundToGateUid
string

退款至用户id

示例:

"10002"

refundChain
string

退款网络

refundBearType
integer<int64>

退款承担类型 1:需商家承担 2:需用户承担

memo
string

退款备注

refundAmountTypeFull
integer<int64>

退款金额类型 1:全部退 2:部分退

needNotify
boolean

是否需要触发退款结果通知;true 表示按商户配置的回调地址发送通知

refundLimit
boolean

退款是否限制次数

refundCurrency
string

退款币种

示例:

"USDT"

refundFundStatementId
integer<int64>

发起退款的流水id

refundSource
integer<int64>

退款发起的源头 0:订单 1:流水

响应

200 - application/json

退款成功

status
string

响应状态

示例:

"SUCCESS"

code
string

响应码

示例:

"000000"

errorMessage
string

错误信息

示例:

""

data
object