Skip to content

通过商户退款单号查询退款

提交退款申请后,通过调用该接口查询退款状态。

请求参数类型描述
out_refund_nostring商户退款单号
queryobject声明请求的查询参数
sub_mchidstring二级商户号
php
$instance->v3->ecommerce->refunds->outRefundNo->_out_refund_no_->getAsync([
  'out_refund_no' => '1217752501201407033233368018',
  'query' => [
    '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/out-refund-no/{out_refund_no}')->getAsync([
  'out_refund_no' => '1217752501201407033233368018',
  'query' => [
    '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/out-refund-no/{out_refund_no}']->getAsync([
  'out_refund_no' => '1217752501201407033233368018',
  'query' => [
    '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->outRefundNo->_out_refund_no_->get([
  'out_refund_no' => '1217752501201407033233368018',
  'query' => [
    'sub_mchid' => '1900000109',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/ecommerce/refunds/out-refund-no/{out_refund_no}')->get([
  'out_refund_no' => '1217752501201407033233368018',
  'query' => [
    'sub_mchid' => '1900000109',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/ecommerce/refunds/out-refund-no/{out_refund_no}']->get([
  'out_refund_no' => '1217752501201407033233368018',
  'query' => [
    'sub_mchid' => '1900000109',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
refund_idstring微信退款单号
out_refund_nostring商户退款单号
transaction_idstring微信订单号
out_trade_nostring商户订单号
channelstring退款渠道
user_received_accountstring退款入账账户
success_timestring退款成功时间
create_timestring退款创建时间
statusstring退款状态
amountobject退款金额信息
refundinteger退款金额
fromobject[]退款出资账户及金额
accountstring出资账户类型
amountnumber出资金额
payer_refundinteger用户退款金额
discount_refundinteger优惠退款金额
currencystring退款币种
advancenumber垫付金额
promotion_detailobject[]营销详情
promotion_idstring券ID
scopestring优惠范围
typestring优惠类型
amountinteger优惠券面额
refund_amountinteger优惠退款金额
refund_accountstring退款出资商户
funds_accountstring资金账户

参阅 官方文档 官方文档

Published on the GitHub by TheNorthMemory