Skip to content

微信支付批次单号查询批次单

服务商可以通过该接口查询转账批次单以及指定状态的转账明细单。

请求参数类型描述
batch_idstring微信支付批次单号
queryobject声明请求的查询参数
need_query_detailboolean是否查询转账明细单
offsetinteger请求资源起始位置
limitinteger最大资源条数
detail_statusstring明细状态
ALL | SUCCESS | FAIL 枚举值之一
php
$instance->v3->partnerTransfer->batches->batchId->_batch_id_->getAsync([
  'batch_id' => '1030000071100999991182020050700019480001',
  'query' => [
    'need_query_detail' => true,
    'offset' => 0,
    'limit' => 20,
    'detail_status' => 'FAIL',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/partner-transfer/batches/batch-id/{batch_id}')->getAsync([
  'batch_id' => '1030000071100999991182020050700019480001',
  'query' => [
    'need_query_detail' => true,
    'offset' => 0,
    'limit' => 20,
    'detail_status' => 'FAIL',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/partner-transfer/batches/batch-id/{batch_id}']->getAsync([
  'batch_id' => '1030000071100999991182020050700019480001',
  'query' => [
    'need_query_detail' => true,
    'offset' => 0,
    'limit' => 20,
    'detail_status' => 'FAIL',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->partnerTransfer->batches->batchId->_batch_id_->get([
  'batch_id' => '1030000071100999991182020050700019480001',
  'query' => [
    'need_query_detail' => true,
    'offset' => 0,
    'limit' => 20,
    'detail_status' => 'FAIL',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/partner-transfer/batches/batch-id/{batch_id}')->get([
  'batch_id' => '1030000071100999991182020050700019480001',
  'query' => [
    'need_query_detail' => true,
    'offset' => 0,
    'limit' => 20,
    'detail_status' => 'FAIL',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/partner-transfer/batches/batch-id/{batch_id}']->get([
  'batch_id' => '1030000071100999991182020050700019480001',
  'query' => [
    'need_query_detail' => true,
    'offset' => 0,
    'limit' => 20,
    'detail_status' => 'FAIL',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
sp_mchidstring服务商商户号
sub_mchidstring特约商户号
out_batch_nostring商家批次单号
batch_idstring微信支付批次单号
sub_appidstring特约商户appid
batch_statusstring批次状态
batch_typestring批次类型
authorization_typestring特约商户授权类型
batch_namestring批次名称
batch_remarkstring批次备注
close_reasonstring批次关闭原因
total_amountinteger转账总金额
total_numinteger转账总笔数
create_timestring批次创建时间
update_timestring批次更新时间
success_amountinteger转账成功金额
success_numinteger转账成功笔数
fail_amountinteger转账失败金额
fail_numinteger转账失败笔数
transfer_detail_listobject[]转账明细单列表
detail_idstring微信支付明细单号
out_detail_nostring商家明细单号
detail_statusstring明细状态
sp_appidstring服务商的appid
transfer_purposestring批量转账用途
GOODSPAYMENT | COMMISSION | REFUND | REIMBURSEMENT | FREIGHT | OTHERS 枚举值之一
transfer_scenestring转账场景
ORDINARY_TRANSFER | PAYROLL_CARD_TRANSFER 枚举值之一

参阅 官方文档 官方文档

Published on the GitHub by TheNorthMemory