Skip to content

垫付退款回补

提交垫付退款后,发起退款方可通过该接口发起垫付退款资金回补,把退款垫付的资金从二级商户回补到电商平台账户。

请求参数类型描述
refund_idstring微信退款单号
jsonobject声明请求的JSON数据结构
sub_mchidstring二级商户号
php
$instance->v3->ecommerce->refunds->_refund_id_->returnAdvance->postAsync([
  'refund_id' => '50000000382019052709732678859',
  'json' => [
    '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/{refund_id}/return-advance')->postAsync([
  'refund_id' => '50000000382019052709732678859',
  'json' => [
    '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/{refund_id}/return-advance']->postAsync([
  'refund_id' => '50000000382019052709732678859',
  'json' => [
    '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->_refund_id_->returnAdvance->post([
  'refund_id' => '50000000382019052709732678859',
  'json' => [
    'sub_mchid' => '1900000109',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/ecommerce/refunds/{refund_id}/return-advance')->post([
  'refund_id' => '50000000382019052709732678859',
  'json' => [
    'sub_mchid' => '1900000109',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/ecommerce/refunds/{refund_id}/return-advance']->post([
  'refund_id' => '50000000382019052709732678859',
  'json' => [
    'sub_mchid' => '1900000109',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
refund_idstring微信退款单号
advance_return_idstring微信回补单号
return_amountinteger垫付回补金额
payer_mchidstring出款方商户号
payer_accountstring出款方账户
payee_mchidstring入账方商户号
payee_accountstring入账方账户
resultstring垫付回补结果
success_timestring垫付回补完成时间

参阅 官方文档 官方文档

查询垫付回补结果

提交垫付退款回补后,通过调用该接口查询垫付回补结果。

请求参数类型描述
refund_idstring微信退款单号
queryobject声明请求的查询参数
sub_mchidstring二级商户号
php
$instance->v3->ecommerce->refunds->_refund_id_->returnAdvance->getAsync([
  'refund_id' => '50000000382019052709732678859',
  '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/{refund_id}/return-advance')->getAsync([
  'refund_id' => '50000000382019052709732678859',
  '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/{refund_id}/return-advance']->getAsync([
  'refund_id' => '50000000382019052709732678859',
  '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->_refund_id_->returnAdvance->get([
  'refund_id' => '50000000382019052709732678859',
  'query' => [
    'sub_mchid' => '1900000109',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/ecommerce/refunds/{refund_id}/return-advance')->get([
  'refund_id' => '50000000382019052709732678859',
  'query' => [
    'sub_mchid' => '1900000109',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/ecommerce/refunds/{refund_id}/return-advance']->get([
  'refund_id' => '50000000382019052709732678859',
  'query' => [
    'sub_mchid' => '1900000109',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
refund_idstring微信退款单号
advance_return_idstring微信回补单号
return_amountinteger垫付回补金额
payer_mchidstring出款方商户号
payer_accountstring出款方账户
payee_mchidstring入账方商户号
payee_accountstring入账方账户
resultstring垫付回补结果
success_timestring垫付回补完成时间

参阅 官方文档 官方文档

Published on the GitHub by TheNorthMemory