请求补差回退
订单发送退款的时候,可以对补贴成功的补差单发起回退。
请求参数 | 类型 | 描述 |
---|---|---|
json | object | 声明请求的JSON 数据结构 |
sub_mchid | string | 二级商户号 |
out_order_no | string | 商户补差回退单号 |
transaction_id | string | 微信订单号 |
refund_id | string | 微信退款单号 |
amount | integer | 补差回退金额 |
description | string | 补差回退描述 |
php
$instance->v3->ecommerce->subsidies->return->postAsync([
'json' => [
'sub_mchid' => '1900000109',
'out_order_no' => 'P20150806125346',
'transaction_id' => '4208450740201411110007820472',
'refund_id' => '3008450740201411110007820472',
'amount' => 10,
'description' => '测试备注',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/ecommerce/subsidies/return')->postAsync([
'json' => [
'sub_mchid' => '1900000109',
'out_order_no' => 'P20150806125346',
'transaction_id' => '4208450740201411110007820472',
'refund_id' => '3008450740201411110007820472',
'amount' => 10,
'description' => '测试备注',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/ecommerce/subsidies/return']->postAsync([
'json' => [
'sub_mchid' => '1900000109',
'out_order_no' => 'P20150806125346',
'transaction_id' => '4208450740201411110007820472',
'refund_id' => '3008450740201411110007820472',
'amount' => 10,
'description' => '测试备注',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->ecommerce->subsidies->return->post([
'json' => [
'sub_mchid' => '1900000109',
'out_order_no' => 'P20150806125346',
'transaction_id' => '4208450740201411110007820472',
'refund_id' => '3008450740201411110007820472',
'amount' => 10,
'description' => '测试备注',
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/ecommerce/subsidies/return')->post([
'json' => [
'sub_mchid' => '1900000109',
'out_order_no' => 'P20150806125346',
'transaction_id' => '4208450740201411110007820472',
'refund_id' => '3008450740201411110007820472',
'amount' => 10,
'description' => '测试备注',
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/ecommerce/subsidies/return']->post([
'json' => [
'sub_mchid' => '1900000109',
'out_order_no' => 'P20150806125346',
'transaction_id' => '4208450740201411110007820472',
'refund_id' => '3008450740201411110007820472',
'amount' => 10,
'description' => '测试备注',
],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典 | 类型 | 描述 |
---|---|---|
sub_mchid | string | 二级商户号 |
transaction_id | string | 微信订单号 |
subsidy_refund_id | string | 微信补差回退单号 |
refund_id | string | 微信退款单号 |
out_order_no | string | 商户补差回退单号 |
amount | integer | 补差回退金额 |
description | string | 补差回退描述 |
result | string | 补差回退结果 |
success_time | string | 补差回退完成时间 |
参阅 官方文档