Skip to content

通过微信支付退款单号查询退款

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

请求参数类型描述
refund_idstring微信退款单号
queryobject声明请求的查询参数
individual_auth_idstring商品单个人收款方受理授权ID
sub_mchidstring二级商户号
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_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退款出资商户
REFUND_SOURCE_SUB_MERCHANT | REFUND_SOURCE_PARTNER_ADVANCE 枚举值之一
funds_accountstring资金账户
AVAILABLE | UNSETTLED 枚举值之一

参阅 官方文档 官方文档 官方文档

Published on the GitHub by TheNorthMemory