Skip to content

二级商户按日终余额预约提现

二级商户按日终余额预约提现API帮助二级商户发起基本户提现。提现金额按前一天日终余额计算,当前余额少于前一天日终余额时退化为按当前余额计算(请求参数需额外设置该选项)。预计当日到账,具体以实际银行处理为准。

请求参数类型描述
jsonobject声明请求的JSON数据结构
sub_mchidstring特约商户号
out_request_nostring商户提现单号
calculate_amount_typestring计算提现金额方式
ONLY_DAY_END_BALANCE | ALLOW_CURRENT_BALANCE 枚举值之一
remarkstring提现备注
bank_memostring银行附言
notify_urlstring提现结果通知地址
reserve_amountinteger留存额
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_mchidstring收付通平台商户号
sub_mchidstring特约商户号
statusstring单据状态
CREATED | PROCESSING | FINISHED | ABNORMAL 枚举值之一
withdraw_idstring微信支付提现单号
out_request_nostring商户提现单号
total_amountinteger提现金额
success_amountinteger提现成功金额
fail_amountinteger提现失败金额
refund_amountinteger提现退票金额
create_timestring发起提现时间
update_timestring提现状态更新时间
reasonstring失败原因
remarkstring提现备注
bank_memostring银行附言
account_typestring出款账户类型
BASIC | OPERATION | FEES 枚举值之一
account_numberstring入账银行账号后四位
account_bankstring入账银行
bank_namestring入账银行全称(含支行)

参阅 官方文档

Published on the GitHub by TheNorthMemory