Skip to content

账户余额提现

电商平台通过余额提现API帮助二级商户发起账户余额提现申请,完成账户余额提现。

请求参数类型描述
jsonobject声明请求的JSON数据结构
sub_mchidstring特约商户号
out_request_nostring商户提现单号
amountinteger提现金额
remarkstring提现备注
bank_memostring银行附言
account_typestring出款账户类型
BASIC | OPERATION | FEES 枚举值之一
php
$instance->v3->ecommerce->fund->withdraw->postAsync([
  'json' => [
    'sub_mchid'      => '1900000109',
    'out_request_no' => '20190611222222222200000000012122',
    'amount'         => 100,
    'remark'         => '交易提现',
    'bank_memo'      => '微信支付提现',
    'account_type'   => 'BASIC',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/ecommerce/fund/withdraw')->postAsync([
  'json' => [
    'sub_mchid'      => '1900000109',
    'out_request_no' => '20190611222222222200000000012122',
    'amount'         => 100,
    'remark'         => '交易提现',
    'bank_memo'      => '微信支付提现',
    'account_type'   => 'BASIC',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/ecommerce/fund/withdraw']->postAsync([
  'json' => [
    'sub_mchid'      => '1900000109',
    'out_request_no' => '20190611222222222200000000012122',
    'amount'         => 100,
    'remark'         => '交易提现',
    'bank_memo'      => '微信支付提现',
    'account_type'   => 'BASIC',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->ecommerce->fund->withdraw->post([
  'json' => [
    'sub_mchid'      => '1900000109',
    'out_request_no' => '20190611222222222200000000012122',
    'amount'         => 100,
    'remark'         => '交易提现',
    'bank_memo'      => '微信支付提现',
    'account_type'   => 'BASIC',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/ecommerce/fund/withdraw')->post([
  'json' => [
    'sub_mchid'      => '1900000109',
    'out_request_no' => '20190611222222222200000000012122',
    'amount'         => 100,
    'remark'         => '交易提现',
    'bank_memo'      => '微信支付提现',
    'account_type'   => 'BASIC',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/ecommerce/fund/withdraw']->post([
  'json' => [
    'sub_mchid'      => '1900000109',
    'out_request_no' => '20190611222222222200000000012122',
    'amount'         => 100,
    'remark'         => '交易提现',
    'bank_memo'      => '微信支付提现',
    'account_type'   => 'BASIC',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
sub_mchidstring特约商户号
withdraw_idstring微信支付提现单号
out_request_nostring商户提现单号
account_typestring出款账户类型
BASIC | OPERATION | FEES 枚举值之一

参阅 官方文档 官方文档

Published on the GitHub by TheNorthMemory