垫付退款回补
提交垫付退款后,发起退款方可通过该接口发起垫付退款资金回补,把退款垫付的资金从二级商户回补到电商平台账户。
请求参数 | 类型 | 描述 |
---|---|---|
refund_id | string | 微信退款单号 |
json | object | 声明请求的JSON 数据结构 |
sub_mchid | string | 二级商户号 |
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_id | string | 微信退款单号 |
advance_return_id | string | 微信回补单号 |
return_amount | integer | 垫付回补金额 |
payer_mchid | string | 出款方商户号 |
payer_account | string | 出款方账户 |
payee_mchid | string | 入账方商户号 |
payee_account | string | 入账方账户 |
result | string | 垫付回补结果 |
success_time | string | 垫付回补完成时间 |
查询垫付回补结果
提交垫付退款回补后,通过调用该接口查询垫付回补结果。
请求参数 | 类型 | 描述 |
---|---|---|
refund_id | string | 微信退款单号 |
query | object | 声明请求的查询参数 |
sub_mchid | string | 二级商户号 |
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_id | string | 微信退款单号 |
advance_return_id | string | 微信回补单号 |
return_amount | integer | 垫付回补金额 |
payer_mchid | string | 出款方商户号 |
payer_account | string | 出款方账户 |
payee_mchid | string | 入账方商户号 |
payee_account | string | 入账方账户 |
result | string | 垫付回补结果 |
success_time | string | 垫付回补完成时间 |