Skip to content

查询单笔退款(商户退款订单号)

提交退款申请后,通过调用该接口查询退款状态。退款有一定延时,用零钱支付的退款20分钟内到账,银行卡支付的退款3个工作日后重新查询退款状态。

请求参数类型描述
base_uristring声明接入点https://apihk.mch.weixin.qq.com/(香港接入)
out_refund_nostring商户退款订单号
queryobject声明请求的查询参数
mchidstring商户号
sub_mchidstring子商户号
sp_mchidstring机构商户号
php
$instance->v3->global->refunds->outRefundNo->_out_refund_no_->getAsync([
  'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
  'out_refund_no' => '1217752501201407033233368018',
  '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/out-refund-no/{out_refund_no}')->getAsync([
  'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
  'out_refund_no' => '1217752501201407033233368018',
  '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/out-refund-no/{out_refund_no}']->getAsync([
  'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
  'out_refund_no' => '1217752501201407033233368018',
  '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->outRefundNo->_out_refund_no_->get([
  'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
  'out_refund_no' => '1217752501201407033233368018',
  'query' => [
    'mchid'     => '1900000109',
    'sub_mchid' => '1900000109',
    'sp_mchid'  => '1900000100',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/global/refunds/out-refund-no/{out_refund_no}')->get([
  'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
  'out_refund_no' => '1217752501201407033233368018',
  'query' => [
    'mchid'     => '1900000109',
    'sub_mchid' => '1900000109',
    'sp_mchid'  => '1900000100',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/global/refunds/out-refund-no/{out_refund_no}']->get([
  'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
  'out_refund_no' => '1217752501201407033233368018',
  'query' => [
    'mchid'     => '1900000109',
    'sub_mchid' => '1900000109',
    'sp_mchid'  => '1900000100',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
idstring微信支付退款订单号
out_refund_nostring商户退款单号
transaction_idstring微信支付交易订单号
out_trade_nostring商户原交易订单号
channelstring退款渠道
recv_accountstring退款入账账户
fund_sourcestring退款资金来源
success_timestring退款成功时间
create_timestring退款创建时间
statusstring退款状态
amountobject退款金额
refundinteger退款金额
currencystring货币类型
payer_refundinteger用户退款金额
payer_currencystring支付币种
exchange_rateobject汇率
typestring汇率类型
rateinteger汇率值
detailobject优惠退款详情
promotion_idstring券ID
scopestring优惠范围
typestring优惠类型
amountinteger优惠券面额
refund_amountinteger优惠券退款额
currencystring货币类型

参阅 官方文档

Published on the GitHub by TheNorthMemory