二级商户按日终余额预约提现
二级商户按日终余额预约提现API帮助二级商户发起基本户提现。提现金额按前一天日终余额计算,当前余额少于前一天日终余额时退化为按当前余额计算(请求参数需额外设置该选项)。预计当日到账,具体以实际银行处理为准。
| 请求参数 | 类型 | 描述 |
|---|---|---|
| json | object | 声明请求的JSON数据结构 |
| sub_mchid | string | 特约商户号 |
| out_request_no | string | 商户提现单号 |
| calculate_amount_type | string | 计算提现金额方式ONLY_DAY_END_BALANCE | ALLOW_CURRENT_BALANCE 枚举值之一 |
| remark | string | 提现备注 |
| bank_memo | string | 银行附言 |
| notify_url | string | 提现结果通知地址 |
| reserve_amount | integer | 留存额 |
php
$instance->v3->platsolution->ecommerce->withdraw->dayEndBalanceWithdraw->postAsync([
'json' => [
'sub_mchid' => '1900000109',
'out_request_no' => '20190611222222222200000000012122',
'calculate_amount_type' => 'ONLY_DAY_END_BALANCE',
'remark' => '交易提现',
'bank_memo' => '微信支付提现',
'notify_url' => 'https://yourapp.com/notify',
'reserve_amount' => 100,
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();php
$instance->chain('v3/platsolution/ecommerce/withdraw/day-end-balance-withdraw')->postAsync([
'json' => [
'sub_mchid' => '1900000109',
'out_request_no' => '20190611222222222200000000012122',
'calculate_amount_type' => 'ONLY_DAY_END_BALANCE',
'remark' => '交易提现',
'bank_memo' => '微信支付提现',
'notify_url' => 'https://yourapp.com/notify',
'reserve_amount' => 100,
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();php
$instance['v3/platsolution/ecommerce/withdraw/day-end-balance-withdraw']->postAsync([
'json' => [
'sub_mchid' => '1900000109',
'out_request_no' => '20190611222222222200000000012122',
'calculate_amount_type' => 'ONLY_DAY_END_BALANCE',
'remark' => '交易提现',
'bank_memo' => '微信支付提现',
'notify_url' => 'https://yourapp.com/notify',
'reserve_amount' => 100,
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();php
$response = $instance->v3->platsolution->ecommerce->withdraw->dayEndBalanceWithdraw->post([
'json' => [
'sub_mchid' => '1900000109',
'out_request_no' => '20190611222222222200000000012122',
'calculate_amount_type' => 'ONLY_DAY_END_BALANCE',
'remark' => '交易提现',
'bank_memo' => '微信支付提现',
'notify_url' => 'https://yourapp.com/notify',
'reserve_amount' => 100,
],
]);
print_r(json_decode((string) $response->getBody(), true));php
$response = $instance->chain('v3/platsolution/ecommerce/withdraw/day-end-balance-withdraw')->post([
'json' => [
'sub_mchid' => '1900000109',
'out_request_no' => '20190611222222222200000000012122',
'calculate_amount_type' => 'ONLY_DAY_END_BALANCE',
'remark' => '交易提现',
'bank_memo' => '微信支付提现',
'notify_url' => 'https://yourapp.com/notify',
'reserve_amount' => 100,
],
]);
print_r(json_decode((string) $response->getBody(), true));php
$response = $instance['v3/platsolution/ecommerce/withdraw/day-end-balance-withdraw']->post([
'json' => [
'sub_mchid' => '1900000109',
'out_request_no' => '20190611222222222200000000012122',
'calculate_amount_type' => 'ONLY_DAY_END_BALANCE',
'remark' => '交易提现',
'bank_memo' => '微信支付提现',
'notify_url' => 'https://yourapp.com/notify',
'reserve_amount' => 100,
],
]);
print_r(json_decode((string) $response->getBody(), true));| 返回字典 | 类型 | 描述 |
|---|---|---|
| sp_mchid | string | 收付通平台商户号 |
| sub_mchid | string | 特约商户号 |
| status | string | 单据状态CREATED | PROCESSING | FINISHED | ABNORMAL 枚举值之一 |
| withdraw_id | string | 微信支付提现单号 |
| out_request_no | string | 商户提现单号 |
| total_amount | integer | 提现金额 |
| success_amount | integer | 提现成功金额 |
| fail_amount | integer | 提现失败金额 |
| refund_amount | integer | 提现退票金额 |
| create_time | string | 发起提现时间 |
| update_time | string | 提现状态更新时间 |
| reason | string | 失败原因 |
| remark | string | 提现备注 |
| bank_memo | string | 银行附言 |
| account_type | string | 出款账户类型BASIC | OPERATION | FEES 枚举值之一 |
| account_number | string | 入账银行账号后四位 |
| account_bank | string | 入账银行 |
| bank_name | string | 入账银行全称(含支行) |
参阅 官方文档