通过微信支付退款单号查询退款
提交退款申请后,通过调用该接口查询退款状态。
请求参数 | 类型 | 描述 |
---|---|---|
refund_id | string | 微信退款单号 |
query | object | 声明请求的查询参数 |
individual_auth_id | string | 商品单个人收款方受理授权ID |
sub_mchid | string | 二级商户号 |
php
$instance->v3->ecommerce->refunds->id->_refund_id_->getAsync([
'refund_id' => '50000000382019052709732678859',
'query' => [
'individual_auth_id' => '1900000109',
'sub_mchid' => '1900000109',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/ecommerce/refunds/id/{refund_id}')->getAsync([
'refund_id' => '50000000382019052709732678859',
'query' => [
'individual_auth_id' => '1900000109',
'sub_mchid' => '1900000109',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/ecommerce/refunds/id/{refund_id}']->getAsync([
'refund_id' => '50000000382019052709732678859',
'query' => [
'individual_auth_id' => '1900000109',
'sub_mchid' => '1900000109',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->ecommerce->refunds->id->_refund_id_->get([
'refund_id' => '50000000382019052709732678859',
'query' => [
'individual_auth_id' => '1900000109',
'sub_mchid' => '1900000109',
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/ecommerce/refunds/id/{refund_id}')->get([
'refund_id' => '50000000382019052709732678859',
'query' => [
'individual_auth_id' => '1900000109',
'sub_mchid' => '1900000109',
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/ecommerce/refunds/id/{refund_id}']->get([
'refund_id' => '50000000382019052709732678859',
'query' => [
'individual_auth_id' => '1900000109',
'sub_mchid' => '1900000109',
],
]);
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 | 退款状态 |
amount | object | 退款金额信息 |
refund | integer | 退款金额 |
from | object[] | 退款出资账户及金额 |
account | string | 出资账户类型 |
amount | number | 出资金额 |
payer_refund | integer | 用户退款金额 |
discount_refund | integer | 优惠退款金额 |
currency | string | 退款币种 |
advance | number | 垫付金额 |
promotion_detail | object[] | 营销详情 |
promotion_id | string | 券ID |
scope | string | 优惠范围 |
type | string | 优惠类型 |
amount | integer | 优惠券面额 |
refund_amount | integer | 优惠退款金额 |
refund_account | string | 退款出资商户REFUND_SOURCE_SUB_MERCHANT | REFUND_SOURCE_PARTNER_ADVANCE 枚举值之一 |
funds_account | string | 资金账户AVAILABLE | UNSETTLED 枚举值之一 |