跳转至

申请退款

请求方式 body 编码 接口地址
POST application/json UTF-8 集测:https://wpawtest.shengpay.com/api/v1/payment/refund
生产:https://wpaw.shengpay.com/api/v1/payment/refund

请求参数

变量名 类型 必填 示例值 描述
appId String(32) Y djgeiq978y933 应用标识
mchId String(16) Y 93751497 商户号
outTradeNo String(32) Y 1602835300345 商户订单号
outRefundNo String(32) Y 1602835300345 商户退款订单号
nonceStr String(32) Y pWUVWVYWNQhnTXpQzhIzMGCwqBkZclzg 随机字符串
totalFee int Y 1000 订单总金额(单位:分)
refundFee int Y 1000 退款金额(单位:分)
refundDesc String(128) N 退款原因
refundAccount String(32) N UNSETTLED 退款资金来源
notifyUrl String(300) Y https://notify.shengpay.com/notify 商户通知回调地址
nonceStr String(32) Y pWUVWVYWNQhnTXpQzhIzMGCwqBkZclzg 随机字符串
signType String(8) Y RSA 签名类型
sign String (1024) Y 签名

请求示例

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
{
    "appId":"djgeiq978y933",
    "mchId":"93751497",
    "nonceStr":"ZmTruYz2Tld2hIRRg4Nf",
    "notifyUrl":"https://openapi2.lx-qa.com/pay/callback/v2/refund",
    "outRefundNo":"202105080000000488560",
    "outTradeNo":"202105080000000488560",
    "refundFee":100,
    "sign":"LbSLSAj7i7YwqAOzTnVRatCyp/SWSqiNiIXUzpLN4fF7ypsCq9K3a2I+l2fTYgqDQPcTF4AOsmy5XveYnMzp5qlASasAkPH2W+KhTmStWfu6UKb05jzJR4/WyQr0BD3gzgvEP22T9BRJUiZIpx6W5dfYE1NBc6ES3SFiHXiGV2AgPZqh6w6E3rctLP1fZP/n752pk3/KP9mtaXmzm/UE2RrCMJj/1Ubg1vdWkNe0GKztl5gX5GEcWITXBnfA8Kj0ovJI1xtfGXHfHgSLnk4dmC33xGO7w3pMbA+ZlI+mOIuuVuv667vYt5bs+AwzWk+b9TyeG6Zs3gz1GZp7S4ySWw==",
    "signType":"RSA",
    "totalFee":100
}

响应参数

变量名 类型 必填 示例值 描述
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时使用)
mchId String(16) Y 93751497 商户号
appId String(32) Y djgeiq978y933 应用标识
transactionId String(32) Y C2110160000000091672 盛付通订单号
outTradeNo String(32) Y 1602835300345 商户订单号
outRefundNo String(32) Y 1602835300345 商户退款订单号
refundId String(32) Y RO2110160000000014290 盛付通退款订单号
refundFee int Y 1000 退款金额(单位:分)
settlementRefundFee int Y 1000 实际退结算金额(单位:分)
totalFee int Y 1000 订单总金额(单位:分)
settlementTotalFee int Y 1000 实际结算金额(单位:分)
couponRefundCount int N 1 代金券使用数量
couponRefundFee int N 10 代金券总金额
couponRefundId$n String(32) N 10 代金券ID($n从0开始计数)
couponType$n String(32) N 代金券类型($n从0开始计数)
couponRefundFee$n int N 单个代金券金额($n从0开始计数)
nonceStr String(32) Y 随机字符串
signType String(8) Y RSA 签名方式
sign String (1024) Y 签名

响应示例

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
{
    "refundFee":"10",
    "mchId":"93751497",
    "outRefundNo":"202105080000000488560",
    "resultCode":"SUCCESS",
    "sign":"Sewks8vMaK4wZU1U3X1MumbK5OYb95luriD2dQGek0whfQJo2N7tUaYgdEHRngWBHhqA/C++dvGkA7LTvnLY/UDl1Z3E0abcFOCAMELAGh8bzRTJJkZ3O6IKqfdg/4Bii/mAevLMZRMaHCY1rhfDpeio/h8b/iM/lyNJ3hO6aq0=",
    "settlementRefundFee":10,
    "transactionId":"C2110160000000091671",
    "nonceStr":"GLEhZmpGicVlbEeCRYOEagLPhkwgBgRH",
    "returnCode":"SUCCESS",
    "returnMsg":"OK",
    "totalFee":1000,
    "appId":"djgeiq978y933",
    "outTradeNo":"202105080000000488560",
    "signType":"RSA",
    "refundId":"RO2110160000000014290",
    "settlementTotalFee":1000
}
Back to top