Skip to content

申请银行转账充值

商户系统须通过调用此接口获取银行转账账号,随后发起充值流程

请求参数类型描述
jsonobject声明请求的JSON数据结构
out_recharge_nostring商户充值单号
recharge_scenestring充值场景
NORMAL_BANK_TRANSFER 枚举值
account_typestring充值入账账户
BASIC | OPERATION | FEES 枚举值之一
recharge_amountobject充值金额
amountnumber总金额
currencystring货币类型
php
$instance->v3->recharge->bankTransferRecharges->apply->postAsync([
  'json' => [
    'out_recharge_no' => 'cz202407181234',
    'recharge_scene'  => 'NORMAL_BANK_TRANSFER',
    'account_type'    => 'BASIC',
    'recharge_amount' => [
      'amount'   => 500000,
      'currency' => 'CNY',
    ],
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/recharge/bank-transfer-recharges/apply')->postAsync([
  'json' => [
    'out_recharge_no' => 'cz202407181234',
    'recharge_scene'  => 'NORMAL_BANK_TRANSFER',
    'account_type'    => 'BASIC',
    'recharge_amount' => [
      'amount'   => 500000,
      'currency' => 'CNY',
    ],
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/recharge/bank-transfer-recharges/apply']->postAsync([
  'json' => [
    'out_recharge_no' => 'cz202407181234',
    'recharge_scene'  => 'NORMAL_BANK_TRANSFER',
    'account_type'    => 'BASIC',
    'recharge_amount' => [
      'amount'   => 500000,
      'currency' => 'CNY',
    ],
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->recharge->bankTransferRecharges->apply->post([
  'json' => [
    'out_recharge_no' => 'cz202407181234',
    'recharge_scene'  => 'NORMAL_BANK_TRANSFER',
    'account_type'    => 'BASIC',
    'recharge_amount' => [
      'amount'   => 500000,
      'currency' => 'CNY',
    ],
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/recharge/bank-transfer-recharges/apply')->post([
  'json' => [
    'out_recharge_no' => 'cz202407181234',
    'recharge_scene'  => 'NORMAL_BANK_TRANSFER',
    'account_type'    => 'BASIC',
    'recharge_amount' => [
      'amount'   => 500000,
      'currency' => 'CNY',
    ],
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/recharge/bank-transfer-recharges/apply']->post([
  'json' => [
    'out_recharge_no' => 'cz202407181234',
    'recharge_scene'  => 'NORMAL_BANK_TRANSFER',
    'account_type'    => 'BASIC',
    'recharge_amount' => [
      'amount'   => 500000,
      'currency' => 'CNY',
    ],
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
recharge_idstring微信支付充值单号
out_recharge_nostring商户充值单号
transfer_in_accountobject银行账户
bank_namestring开户银行名称
bank_address_codestring开户银行省市编码
bank_codestring开户银行行号
bank_account_namestring银行账户名称
bank_account_nostring银行账号

参阅 官方文档

Published on the GitHub by TheNorthMemory