POST QuickPay/Refund
申请退款接口,当交易发生之后一段时间内,由于买家或者卖家的原因需要退款时,卖家可以通过本接口将支付款退还给买家。退款支持单笔交易分多次退款,多次退款需要提交原支付订单的商户订单号和设置不同的退款单号。一笔退款失败后重新提交,要采用原来的退款单号。总退款金额不能超过用户实际支付金额。
请求信息
请求URI参数
无
请求数据参数
退款信息
RefundInfo| 名称 | 说明 | 类型 | 扩展说明 |
|---|---|---|---|
| store_no |
门店编码. |
字符串 |
必填 字符长度: 必须在 1 和 32 之间 |
| operator |
操作员 |
字符串 |
必填 字符长度: 必须在 1 和 16 之间 |
| amount |
订单交易金额,以分为单位,不超过10位纯数字字符串 |
整数 |
数值范围: 必须在 1 和 9999999999 之间 |
| refund_amount |
本次退款金额,以分为单位,不超过10位纯数字字符串,不能超过订单交易金额 |
整数 |
必填 |
| order_no |
原单单据号 |
字符串 |
必填 |
| refund_no |
退款单据号 必须在此商户系统内唯一,推荐 机构号+门店号+退单编号,一笔退款失败后重新提交,请不要更换退款单号,请使用原商户退款单号。 |
字符串 |
必填 |
| refund_desc |
退款原因 |
字符串 |
无 |
| itemlist |
商品清单列表,如果原单使用了单品优惠券,部分退款必须传递此参数 |
Collection of ItemInfo |
无 |
请求数据格式
application/json, text/json
例子:
{
"store_no": "sample string 1",
"operator": "sample string 2",
"amount": 3,
"refund_amount": 4,
"order_no": "sample string 5",
"refund_no": "sample string 6",
"refund_desc": "sample string 7",
"itemlist": [
{
"item_id": "sample string 1",
"item_no": "sample string 2",
"item_name": "sample string 3",
"quantity": 4,
"price": 5,
"promotion_type": 6
},
{
"item_id": "sample string 1",
"item_no": "sample string 2",
"item_name": "sample string 3",
"quantity": 4,
"price": 5,
"promotion_type": 6
}
]
}
响应数据
资源说明
退款结果信息
ResultInfoOfRefundResultInfo| 名称 | 说明 | 类型 | 扩展说明 |
|---|---|---|---|
| code | ResultCode |
无 |
|
| msg | 字符串 |
无 |
|
| data | RefundResultInfo |
无 |
响应数据格式
application/json, text/json
例子:
{
"code": "SUCCESS",
"msg": "sample string 1",
"data": {
"transaction_status": "CREATE",
"error": "sample string 1",
"store_no": "sample string 2",
"paytype": "WECHATPAY_NATIVE",
"total_amount": 3,
"refund_amount": 4,
"settlement_amount": 5,
"cash_amount": 6,
"coupon_amount": 7,
"order_no": "sample string 8",
"refund_order_no": "sample string 9",
"operator": "sample string 10",
"transaction_no": "sample string 11",
"refund_transaction_no": "sample string 12",
"refund_desc": "sample string 13",
"refund_transaction_time": "sample string 14",
"transaction_message": "sample string 15"
}
}