查询单笔退款(微信支付退款订单号)
提交退款申请后,通过调用该接口查询退款状态。退款有一定延时,用零钱支付的退款20分钟内到账,银行卡支付的退款3个工作日后重新查询退款状态。
请求参数 | 类型 | 描述 |
---|---|---|
base_uri | string | 声明接入点https://apihk.mch.weixin.qq.com/ (香港接入) |
refund_id | string | 微信支付退款订单号 |
query | object | 声明请求的查询参数 |
mchid | string | 商户号 |
sub_mchid | string | 子商户号 |
sp_mchid | string | 机构商户号 |
php
$instance->v3->global->refunds->id->_refund_id_->getAsync([
'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
'refund_id' => '',
'query' => [
'mchid' => '1900000109',
'sub_mchid' => '1900000109',
'sp_mchid' => '1900000100',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/global/refunds/id/{refund_id}')->getAsync([
'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
'refund_id' => '',
'query' => [
'mchid' => '1900000109',
'sub_mchid' => '1900000109',
'sp_mchid' => '1900000100',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/global/refunds/id/{refund_id}']->getAsync([
'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
'refund_id' => '',
'query' => [
'mchid' => '1900000109',
'sub_mchid' => '1900000109',
'sp_mchid' => '1900000100',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->global->refunds->id->_refund_id_->get([
'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
'refund_id' => '',
'query' => [
'mchid' => '1900000109',
'sub_mchid' => '1900000109',
'sp_mchid' => '1900000100',
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/global/refunds/id/{refund_id}')->get([
'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
'refund_id' => '',
'query' => [
'mchid' => '1900000109',
'sub_mchid' => '1900000109',
'sp_mchid' => '1900000100',
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/global/refunds/id/{refund_id}']->get([
'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
'refund_id' => '',
'query' => [
'mchid' => '1900000109',
'sub_mchid' => '1900000109',
'sp_mchid' => '1900000100',
],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典 | 类型 | 描述 |
---|---|---|
id | string | 微信支付退款订单号 |
out_refund_no | string | 商户退款单号 |
transaction_id | string | 微信支付交易订单号 |
out_trade_no | string | 商户原交易订单号 |
channel | string | 退款渠道 |
recv_account | string | 退款入账账户 |
fund_source | string | 退款资金来源 |
success_time | string | 退款成功时间 |
create_time | string | 退款创建时间 |
status | string | 退款状态 |
amount | object | 退款金额 |
refund | integer | 退款金额 |
currency | string | 货币类型 |
payer_refund | integer | 用户退款金额 |
payer_currency | string | 支付币种 |
exchange_rate | object | 汇率 |
type | string | 汇率类型 |
rate | integer | 汇率值 |
detail | object | 优惠退款详情 |
promotion_id | string | 券ID |
scope | string | 优惠范围 |
type | string | 优惠类型 |
amount | integer | 优惠券面额 |
refund_amount | integer | 优惠券退款额 |
currency | string | 货币类型 |
参阅 官方文档