# 1.2 退款查询接口

# 简要描述

  • 退款查询接口

# 请求URL

  • {domain}/open-api/refund/payments

# 请求方式

  • POST

# 请求头

参数名 必选 类型 说明
Content-Type mandatory string application/json

# 请求体参数

参数名 必选 类型 说明
appId string 应用APPID
param string 参数体
sign string 签名

# 请求参数

参数名 必选 类型 长度 示例 说明
originalTransactionId string 1-32 CCP20220428011068111 原交易流水号(原交易流水号或退款交易流水号选填一个)
refundTransactionId string 1-32 CCP20220428011068111 退款交易流水号(原交易流水号或退款交易流水号选填一个)
timestamp long - 1677495496979 当前时间戳

# 请求示例

# 请求体

{
  "appId": "733b887a4a784708bb369524db5b6ded",
  "sign": "A5Vd8NcQvU3QT41Yee2jCIK58jDAKZ6kP5gEE4q7Yu92hUCY3k00FKTSlCNU+CcZm0LSrGbEMFMID3p7uvXaqy5khNv3kPndrgp7MIRHUmQnMgRK+g1XG7PzWdnrqlXc3g+L+kqVja+qrFRz+uVS6GLKLR1P4AtgTa9dok6NU7YTWOnG9r/FwIVx/At4czfEpI10pvg2TptVpiANmseGmz4G30hkaYTTNahkcOMQJn6PDFjivHvjNLZNJVOqHQzVUa+kca1yZZMPHtgxR647KjoY2oAjjl0Y45GL6zP9qHD/eVwcPPAPrRZ4K2o05OJnPf67fAcWNVqpnu6ZGQIXhQ==",
  "param": "{\"originalTransactionId\":\"CU518563189147832320\",\"timestamp\":1722416882}"
}

如何构造请求体


# 响应参数

参数名 类型 说明
code integer 响应码
message string 响应信息
data Object 数据

# data参数(数组)

参数名 类型 说明
mchRefundOrderId string 商户退款订单id
originalTransactionId string 原订单流水号
refundTransactionId string 退款订单流水号
refundAmount Long 退款金额(以分为单位)
feeRefunded Long 退款退回手续费金额(以分为单位)
refundStatus string 退款交易状态
refundCreateTime string 退款创建时间
refundReturnTime string 退款完成时间
failedCode int 失败错误码
failedMessage string 失败信息

# 响应示例

{
  "code": 10000,
  "message": "Success",
  "data": [
    {
      "mchRefundOrderId": "refund7806664227088",
      "originalTransactionId": "CU51856318914782320",
      "refundTransactionId": "1818563941756964864",
      "refundAmount": 10000,
      "feeRefunded": 1000,
      "refundStatus": "FAILED",
      "refundCreateTime": "2024-07-31 16:26:46",
      "refundReturnTime": "2024-07-31 16:26:48",
      "failedCode": -10010,
      "failedMessage": "Channel Refund Failed"
    },
    {
      "mchRefundOrderId": "refund4884505715830",
      "originalTransactionId": "CU51856318914782320",
      "refundTransactionId": "1818566685947465728",
      "refundAmount": 10000,
      "feeRefunded": 1000,
      "refundStatus": "COMPLETED",
      "refundCreateTime": "2024-07-31 16:37:40",
      "refundReturnTime": "2024-07-31 17:07:40"
    }
  ]
}

响应码集合

# 返回失败案例

{
  "code": 21016,
  "message": "Merchant ip forbidden"
}