跳转至

申请退款接口

请求方式 body 编码 接口地址
POST application/json UTF-8 集测:https://mchapitest.shengpay.com/pay/refund
生产:https://mchapi.shengpay.com/pay/refund

请求参数

变量名 类型 必填 示例值 描述
appId String Y 应用标识
feeType String Y 货币类型
mchId String Y 商户号
outRefundNo String Y 商户退款订单号
outTradeNo String Y 商户订单号
refundDesc String N 退款原因
refundFee String Y 退款金额
totalFee String Y 订单金额
transactionId String Y 扣款交易流水号
nonceStr String Y nGBXiNhZjBaFrMGIJAKJQQpfNiSGVjzy 随机字符串
signType String Y RSA 签名方式
sign String Y 签名 (见签名介绍)
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
{
  "appId": "wxd678efh567hg6787",
  "feeType": "CNY",
  "mchId": 93747514,
  "outRefundNo": "R100290807001",
  "outTradeNo": "100290807001",
  "refundFee": "100",
  "totalFee": "100",
  "transactionId": "DO497469603661217792"
}

响应参数

变量名 类型 必填 示例值 描述
returnCode String Y SUCCESS 返回码(SUCCESS/FAIL)
returnMsg String N 返回消息(当returnCode为FAIL时使用)
resultCode String Y SUCCESS 业务结果(SUCCESS/FAIL)
errorCode String N 错误代码(当resultCode为FAIL时使用)
errorCodeDes String N 错误描述(当resultCode为FAIL时使用)
outRefundNo String 商户退款订单号 Y
outTradeNo String 商户订单号 Y
refundFee number 退款金额 Y
refundId String 退款订单号 Y
totalFee number 订单金额 Y
transactionId String 扣款交易流水号 Y
nonceStr String Y nGBXiNhZjBaFrMGIJAKJQQpfNiSGVjzy 随机字符串
signType String Y RSA 签名方式
sign String Y 签名
1
2
3
4
5
6
7
8
9
{
  "outRefundNo": "R100290807001",
  "outTradeNo": "100290807001",
  "refundFee": "100",
  "refundId": "DF510145179916173312",
  "resultCode": "SUCCESS",
  "totalFee": "100",
  "transactionId": "DO497469603661217792"
}
Back to top