Skip to content

商户转账批次单号查询批次单

商家批次单号查单接口。商户可以通过该接口查询转账批次单以及指定状态的转账明细单。返回消息中包含微信批次单号、批次状态、批次类型、转账总金额、转账总笔数、成功金额、失败金额等信息。

请求参数类型描述
out_batch_nostring商家批次单号
queryobject声明请求的查询参数
sub_mchidstring二级商户号
need_query_detailboolean是否查询转账明细单
offsetnumber请求资源起始位置
limitnumber最大资源条数
detail_statestring明细状态
ALL | WAIT_PAY | SUCCESS | FAIL | BANK_REFUND 枚举值之一
php
$instance->v3->platsolution->mchTransfer->batches->outBatchNo->_out_batch_no_->getAsync([
  'out_batch_no' => 'sjzz20230223',
  'query' => [
    'sub_mchid'         => '1900102208',
    'need_query_detail' => true,
    'offset'            => 0,
    'limit'             => 20,
    'detail_state'      => 'ALL',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/platsolution/mch-transfer/batches/out-batch-no/{out_batch_no}')->getAsync([
  'out_batch_no' => 'sjzz20230223',
  'query' => [
    'sub_mchid'         => '1900102208',
    'need_query_detail' => true,
    'offset'            => 0,
    'limit'             => 20,
    'detail_state'      => 'ALL',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/platsolution/mch-transfer/batches/out-batch-no/{out_batch_no}']->getAsync([
  'out_batch_no' => 'sjzz20230223',
  'query' => [
    'sub_mchid'         => '1900102208',
    'need_query_detail' => true,
    'offset'            => 0,
    'limit'             => 20,
    'detail_state'      => 'ALL',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->platsolution->mchTransfer->batches->outBatchNo->_out_batch_no_->get([
  'out_batch_no' => 'sjzz20230223',
  'query' => [
    'sub_mchid'         => '1900102208',
    'need_query_detail' => true,
    'offset'            => 0,
    'limit'             => 20,
    'detail_state'      => 'ALL',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/platsolution/mch-transfer/batches/out-batch-no/{out_batch_no}')->get([
  'out_batch_no' => 'sjzz20230223',
  'query' => [
    'sub_mchid'         => '1900102208',
    'need_query_detail' => true,
    'offset'            => 0,
    'limit'             => 20,
    'detail_state'      => 'ALL',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/platsolution/mch-transfer/batches/out-batch-no/{out_batch_no}']->get([
  'out_batch_no' => 'sjzz20230223',
  'query' => [
    'sub_mchid'         => '1900102208',
    'need_query_detail' => true,
    'offset'            => 0,
    'limit'             => 20,
    'detail_state'      => 'ALL',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
transfer_batchobject转账批次单
out_batch_nostring商家批次单号
batch_idstring商家转账批次单号
sp_appidstring服务商应用ID
sub_mchidstring二级商户号
sub_appidstring二级商户应用ID
batch_statestring批次状态
batch_namestring批次名称
batch_remarkstring批次备注
close_reasonstring批次关闭原因
total_amountnumber转账总金额
total_numnumber转账总笔数
create_timestring批次创建时间
success_amountnumber转账成功金额
success_numnumber转账成功笔数
failed_amountnumber转账失败金额
failed_numnumber转账失败笔数
transfer_scene_idstring转账场景ID
dataobject[]转账明细单列表
detail_idstring商家转账明细单号
out_detail_nostring商家明细单号
detail_statestring明细状态
offsetnumber请求资源起始位置
limitnumber最大资源条数

参阅 官方文档

Published on the GitHub by TheNorthMemory