微信支付转账批次单号查询批次单 
微信商家转账批次单号查单接口。商户可以通过该接口查询转账批次单以及指定状态的转账明细单。返回消息中包含微信批次单号、批次状态、批次类型、转账总金额、转账总笔数、成功金额、失败金额等信息。
| 请求参数 | 类型 | 描述 | 
|---|---|---|
| batch_id | string | 商家转账批次单号 | 
| query | object | 声明请求的查询参数 | 
| sub_mchid | string | 二级商户号 | 
| need_query_detail | boolean | 是否查询转账明细单 | 
| detail_state | string | 明细状态ALL | WAIT_PAY | SUCCESS | FAIL | BANK_REFUND 枚举值之一 | 
| offset | number | 请求资源起始位置 | 
| limit | number | 最大资源条数 | 
php
$instance->v3->platsolution->insurance->mchTransfer->batches->batchId->_batch_id_->getAsync([
  'batch_id' => '131000011085109987515042023022300246500006',
  'query' => [
    'sub_mchid'         => '1900102208',
    'need_query_detail' => true,
    'detail_state'      => 'FAIL',
    'offset'            => 0,
    'limit'             => 20,
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();php
$instance->chain('v3/platsolution/insurance/mch-transfer/batches/batch-id/{batch_id}')->getAsync([
  'batch_id' => '131000011085109987515042023022300246500006',
  'query' => [
    'sub_mchid'         => '1900102208',
    'need_query_detail' => true,
    'detail_state'      => 'FAIL',
    'offset'            => 0,
    'limit'             => 20,
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();php
$instance['v3/platsolution/insurance/mch-transfer/batches/batch-id/{batch_id}']->getAsync([
  'batch_id' => '131000011085109987515042023022300246500006',
  'query' => [
    'sub_mchid'         => '1900102208',
    'need_query_detail' => true,
    'detail_state'      => 'FAIL',
    'offset'            => 0,
    'limit'             => 20,
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();php
$response = $instance->v3->platsolution->insurance->mchTransfer->batches->batchId->_batch_id_->get([
  'batch_id' => '131000011085109987515042023022300246500006',
  'query' => [
    'sub_mchid'         => '1900102208',
    'need_query_detail' => true,
    'detail_state'      => 'FAIL',
    'offset'            => 0,
    'limit'             => 20,
  ],
]);
print_r(json_decode((string) $response->getBody(), true));php
$response = $instance->chain('v3/platsolution/insurance/mch-transfer/batches/batch-id/{batch_id}')->get([
  'batch_id' => '131000011085109987515042023022300246500006',
  'query' => [
    'sub_mchid'         => '1900102208',
    'need_query_detail' => true,
    'detail_state'      => 'FAIL',
    'offset'            => 0,
    'limit'             => 20,
  ],
]);
print_r(json_decode((string) $response->getBody(), true));php
$response = $instance['v3/platsolution/insurance/mch-transfer/batches/batch-id/{batch_id}']->get([
  'batch_id' => '131000011085109987515042023022300246500006',
  'query' => [
    'sub_mchid'         => '1900102208',
    'need_query_detail' => true,
    'detail_state'      => 'FAIL',
    'offset'            => 0,
    'limit'             => 20,
  ],
]);
print_r(json_decode((string) $response->getBody(), true));| 返回字典 | 类型 | 描述 | 
|---|---|---|
| transfer_batch | object | 转账批次单 | 
| out_batch_no | string | 商家批次单号 | 
| batch_id | string | 商家转账批次单号 | 
| sp_appid | string | 服务商应用ID | 
| sub_mchid | string | 二级商户号 | 
| sub_appid | string | 二级商户应用ID | 
| batch_state | string | 批次状态ACCEPTED | PROCESSING | COMPLETED | CLOSED 枚举值之一 | 
| batch_name | string | 批次名称 | 
| batch_remark | string | 批次备注 | 
| close_reason | string | 批次关闭原因MERCHANT_REVOCATION | OVERDUE_CLOSE 枚举值之一 | 
| total_amount | number | 转账总金额 | 
| total_num | number | 转账总笔数 | 
| create_time | string | 批次创建时间 | 
| success_amount | number | 转账成功金额 | 
| success_num | number | 转账成功笔数 | 
| failed_amount | number | 转账失败金额 | 
| failed_num | number | 转账失败笔数 | 
| transfer_scene_id | string | 转账场景ID | 
| data | object[] | 转账明细单列表 | 
| detail_id | string | 商家转账明细单号 | 
| out_detail_no | string | 商家明细单号 | 
| detail_state | string | 明细状态INIT | ALL | WAIT_PAY | SUCCESS | FAIL | BANK_REFUND 枚举值之一 | 
| offset | number | 请求资源起始位置 | 
| limit | number | 最大资源条数 | 
参阅 官方文档