请求补差
服务商下单的时候带上补差标识,微信订单支付成功并结算完成后,发起分账前,调用该口进行补差。
请求参数 | 类型 | 描述 |
---|---|---|
json | object | 声明请求的JSON 数据结构 |
sub_mchid | string | 二级商户号 |
transaction_id | string | 微信订单号 |
amount | integer | 补差金额 |
description | string | 补差描述 |
refund_id | string | 微信退款单号 |
php
$instance->v3->ecommerce->subsidies->create->postAsync([
'json' => [
'sub_mchid' => '1900000109',
'transaction_id' => '4208450740201411110007820472',
'amount' => 10,
'description' => '测试备注',
'refund_id' => '3008450740201411110007820472',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/ecommerce/subsidies/create')->postAsync([
'json' => [
'sub_mchid' => '1900000109',
'transaction_id' => '4208450740201411110007820472',
'amount' => 10,
'description' => '测试备注',
'refund_id' => '3008450740201411110007820472',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/ecommerce/subsidies/create']->postAsync([
'json' => [
'sub_mchid' => '1900000109',
'transaction_id' => '4208450740201411110007820472',
'amount' => 10,
'description' => '测试备注',
'refund_id' => '3008450740201411110007820472',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->ecommerce->subsidies->create->post([
'json' => [
'sub_mchid' => '1900000109',
'transaction_id' => '4208450740201411110007820472',
'amount' => 10,
'description' => '测试备注',
'refund_id' => '3008450740201411110007820472',
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/ecommerce/subsidies/create')->post([
'json' => [
'sub_mchid' => '1900000109',
'transaction_id' => '4208450740201411110007820472',
'amount' => 10,
'description' => '测试备注',
'refund_id' => '3008450740201411110007820472',
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/ecommerce/subsidies/create']->post([
'json' => [
'sub_mchid' => '1900000109',
'transaction_id' => '4208450740201411110007820472',
'amount' => 10,
'description' => '测试备注',
'refund_id' => '3008450740201411110007820472',
],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典 | 类型 | 描述 |
---|---|---|
sub_mchid | string | 二级商户号 |
transaction_id | string | 微信订单号 |
subsidy_id | string | 微信补差单号 |
description | string | 补差描述 |
amount | integer | 补差金额 |
result | string | 补差单结果 |
success_time | string | 补差完成时间 |
参阅 官方文档