Skip to content

银行批次单号查询批次单

批次单号查单接口。转账处理后延迟一段时间(异步进行转账),服务商可以通过该接口查询转账批次单以及指定状态的转账明细单。

请求参数类型描述
queryobject声明请求的查询参数
out_batch_nostring银行批次单号
need_query_detailboolean是否查询转账明细单
offsetinteger请求资源起始位置
limitinteger最大资源条数
detail_statestring明细状态
php
$instance->v3->bankTransfer->batches->outBatchNo->_out_batch_no_->getAsync([
  'query' => [
    'out_batch_no'      => 'plfk2020042013',
    'need_query_detail' => true,
    'offset'            => 0,
    'limit'             => 20,
    'detail_state'      => 'FAIL',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/bank-transfer/batches/out-batch-no/{out_batch_no}')->getAsync([
  'query' => [
    'out_batch_no'      => 'plfk2020042013',
    'need_query_detail' => true,
    'offset'            => 0,
    'limit'             => 20,
    'detail_state'      => 'FAIL',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/bank-transfer/batches/out-batch-no/{out_batch_no}']->getAsync([
  'query' => [
    'out_batch_no'      => 'plfk2020042013',
    'need_query_detail' => true,
    'offset'            => 0,
    'limit'             => 20,
    'detail_state'      => 'FAIL',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->bankTransfer->batches->outBatchNo->_out_batch_no_->get([
  'query' => [
    'out_batch_no'      => 'plfk2020042013',
    'need_query_detail' => true,
    'offset'            => 0,
    'limit'             => 20,
    'detail_state'      => 'FAIL',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/bank-transfer/batches/out-batch-no/{out_batch_no}')->get([
  'query' => [
    'out_batch_no'      => 'plfk2020042013',
    'need_query_detail' => true,
    'offset'            => 0,
    'limit'             => 20,
    'detail_state'      => 'FAIL',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/bank-transfer/batches/out-batch-no/{out_batch_no}']->get([
  'query' => [
    'out_batch_no'      => 'plfk2020042013',
    'need_query_detail' => true,
    'offset'            => 0,
    'limit'             => 20,
    'detail_state'      => 'FAIL',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
bank_sp_mchidstring银行服务商号
platform_mchidstring服务平台商户号
specialized_payment_mchidstring付款企业商户号
sponsor_mchidstring实际出资商户号
user_authorized_mchidstring用户授权商户号
user_authorized_appidstring用户授权appid
out_batch_nostring银行批次单号
batch_idstring微信支付批次单号
transfer_scenestring转账场景
batch_namestring批次名称
batch_remarkstring批次备注
attach_remarkstring附加信息
transfer_purposestring批量转账用途
batch_statestring批次状态
close_reasonstring批次关闭原因
total_amountinteger转账总金额
total_countinteger转账总笔数
create_timestring批次创建时间
update_timestring批次更新时间
success_amountinteger转账成功金额
success_countinteger转账成功笔数
fail_amountinteger转账失败金额
fail_countinteger转账失败笔数
transfer_detail_listobject[]转账明细单列表
detail_idstring微信支付明细单号
out_detail_nostring银行明细单号
detail_statestring明细状态
fail_reasonstring明细失败原因

参阅 官方文档

Published on the GitHub by TheNorthMemory