发起异常退款
提交退款申请后,查询退款确认状态为退款异常,可调用此接口发起异常退款处理。支持退款至用户、退款至交易商户银行账户两种处理方式。
| 请求参数 | 类型 | 描述 |
|---|---|---|
| refund_id | string | 微信退款单号 |
| json | object | 声明请求的JSON数据结构 |
| sub_mchid | string | 子商户号 |
| out_refund_no | string | 商户退款单号 |
| type | string | 异常退款处理方式USER_BANK_CARD | MERCHANT_BANK_CARD 枚举值之一 |
| bank_type | string | 开户银行CMB_DEBIT | COMM_DEBIT | ABC_DEBIT | CCB_DEBIT | ICBC_DEBIT | BOC_DEBIT | PAB_DEBIT | SPDB_DEBIT | CITIC_DEBIT | CEB_DEBIT | CMBC_DEBIT | CIB_DEBIT | GDB_DEBIT | PSBC_DEBIT | NBCB_DEBIT 枚举值之一 |
| bank_account | string | 收款银行卡号 |
| real_name | string | 收款用户姓名 |
| headers | object | 声明请求的头参数 |
| Wechatpay-Serial | string | 微信支付公钥ID/平台证书序列号 |
php
$instance->v3->refund->domestic->refunds->_refund_id_->applyAbnormalRefund->postAsync([
'refund_id' => '50000000382019052709732678859',
'json' => [
'sub_mchid' => '1900000109',
'out_refund_no' => '1217752501201407033233368018',
'type' => 'USER_BANK_CARD',
'bank_type' => 'CMB_DEBIT',
'bank_account' => 'd+xT+MQCvrLHUVDWv/8MR/dB7TkXLVfSrUxMPZy6jWWYzpRrEEaYQE8ZRGYoeorwC+w==',
'real_name' => 'UPgQcZSdq3zOayJwZ5XLrHY2dZU1W2Cd',
],
'headers' => [
'Wechatpay-Serial' => 'PUB_KEY_ID_0114232134912410000000000000',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();php
$instance->chain('v3/refund/domestic/refunds/{refund_id}/apply-abnormal-refund')->postAsync([
'refund_id' => '50000000382019052709732678859',
'json' => [
'sub_mchid' => '1900000109',
'out_refund_no' => '1217752501201407033233368018',
'type' => 'USER_BANK_CARD',
'bank_type' => 'CMB_DEBIT',
'bank_account' => 'd+xT+MQCvrLHUVDWv/8MR/dB7TkXLVfSrUxMPZy6jWWYzpRrEEaYQE8ZRGYoeorwC+w==',
'real_name' => 'UPgQcZSdq3zOayJwZ5XLrHY2dZU1W2Cd',
],
'headers' => [
'Wechatpay-Serial' => 'PUB_KEY_ID_0114232134912410000000000000',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();php
$instance['v3/refund/domestic/refunds/{refund_id}/apply-abnormal-refund']->postAsync([
'refund_id' => '50000000382019052709732678859',
'json' => [
'sub_mchid' => '1900000109',
'out_refund_no' => '1217752501201407033233368018',
'type' => 'USER_BANK_CARD',
'bank_type' => 'CMB_DEBIT',
'bank_account' => 'd+xT+MQCvrLHUVDWv/8MR/dB7TkXLVfSrUxMPZy6jWWYzpRrEEaYQE8ZRGYoeorwC+w==',
'real_name' => 'UPgQcZSdq3zOayJwZ5XLrHY2dZU1W2Cd',
],
'headers' => [
'Wechatpay-Serial' => 'PUB_KEY_ID_0114232134912410000000000000',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();php
$response = $instance->v3->refund->domestic->refunds->_refund_id_->applyAbnormalRefund->post([
'refund_id' => '50000000382019052709732678859',
'json' => [
'sub_mchid' => '1900000109',
'out_refund_no' => '1217752501201407033233368018',
'type' => 'USER_BANK_CARD',
'bank_type' => 'CMB_DEBIT',
'bank_account' => 'd+xT+MQCvrLHUVDWv/8MR/dB7TkXLVfSrUxMPZy6jWWYzpRrEEaYQE8ZRGYoeorwC+w==',
'real_name' => 'UPgQcZSdq3zOayJwZ5XLrHY2dZU1W2Cd',
],
'headers' => [
'Wechatpay-Serial' => 'PUB_KEY_ID_0114232134912410000000000000',
],
]);
print_r(json_decode((string) $response->getBody(), true));php
$response = $instance->chain('v3/refund/domestic/refunds/{refund_id}/apply-abnormal-refund')->post([
'refund_id' => '50000000382019052709732678859',
'json' => [
'sub_mchid' => '1900000109',
'out_refund_no' => '1217752501201407033233368018',
'type' => 'USER_BANK_CARD',
'bank_type' => 'CMB_DEBIT',
'bank_account' => 'd+xT+MQCvrLHUVDWv/8MR/dB7TkXLVfSrUxMPZy6jWWYzpRrEEaYQE8ZRGYoeorwC+w==',
'real_name' => 'UPgQcZSdq3zOayJwZ5XLrHY2dZU1W2Cd',
],
'headers' => [
'Wechatpay-Serial' => 'PUB_KEY_ID_0114232134912410000000000000',
],
]);
print_r(json_decode((string) $response->getBody(), true));php
$response = $instance['v3/refund/domestic/refunds/{refund_id}/apply-abnormal-refund']->post([
'refund_id' => '50000000382019052709732678859',
'json' => [
'sub_mchid' => '1900000109',
'out_refund_no' => '1217752501201407033233368018',
'type' => 'USER_BANK_CARD',
'bank_type' => 'CMB_DEBIT',
'bank_account' => 'd+xT+MQCvrLHUVDWv/8MR/dB7TkXLVfSrUxMPZy6jWWYzpRrEEaYQE8ZRGYoeorwC+w==',
'real_name' => 'UPgQcZSdq3zOayJwZ5XLrHY2dZU1W2Cd',
],
'headers' => [
'Wechatpay-Serial' => 'PUB_KEY_ID_0114232134912410000000000000',
],
]);
print_r(json_decode((string) $response->getBody(), true));| 返回字典 | 类型 | 描述 |
|---|---|---|
| refund_id | string | 微信支付退款号 |
| out_refund_no | string | 商户退款单号 |
| transaction_id | string | 微信支付订单号 |
| out_trade_no | string | 商户订单号 |
| channel | string | 退款渠道 |
| user_received_account | string | 退款入账账户 |
| success_time | string | 退款成功时间 |
| create_time | string | 退款创建时间 |
| status | string | 退款状态 |
| funds_account | string | 资金账户 |
| amount | object | 金额信息 |
| total | number | 订单金额 |
| refund | number | 退款金额 |
| from | object[] | 退款出资账户及金额 |
| account | string | 出资账户类型 |
| amount | number | 出资金额 |
| payer_total | number | 用户支付金额 |
| payer_refund | number | 用户退款金额 |
| settlement_refund | number | 应结退款金额 |
| settlement_total | number | 应结订单金额 |
| discount_refund | number | 优惠退款金额 |
| currency | string | 退款币种 |
| refund_fee | number | 手续费退款金额 |
| promotion_detail | object[] | 优惠退款信息 |
| promotion_id | string | 券ID |
| scope | string | 优惠范围 |
| type | string | 优惠类型 |
| amount | number | 优惠券面额 |
| refund_amount | number | 优惠退款金额 |
| goods_detail | object[] | 商品列表 |
| merchant_goods_id | string | 商户侧商品编码 |
| wechatpay_goods_id | string | 微信侧商品编码 |
| goods_name | string | 商品名称 |
| unit_price | number | 商品单价 |
| refund_amount | number | 商品退款金额 |
| refund_quantity | number | 商品退货数量 |
参阅 官方文档 官方文档 官方文档 官方文档 官方文档 官方文档 官方文档 官方文档 官方文档 官方文档 官方文档 官方文档 官方文档 官方文档 官方文档 官方文档 官方文档 官方文档 官方文档 官方文档 官方文档 官方文档