Skip to content

微信支付转账明细单号查询明细单

微信商家转账明细单号查单接口。商户可以通过该接口查询单笔转账明细单。返回消息中包含微信明细单号、明细状态、转账金额、失败原因、收款用户姓名、收款用户OpenID等信息。

请求参数类型描述
batch_idstring商家转账批次单号
detail_idstring商家转账明细单号
queryobject声明请求的查询参数
sub_mchidstring二级商户号
php
$instance->v3->platsolution->mchTransfer->batches->batchId->_batch_id_->details->detailId->_detail_id_->getAsync([
  'batch_id' => '131000011085109987515042023022300246500006',
  'detail_id' => '132000011085109987515042023022300246521006',
  'query' => [
    'sub_mchid' => '1900000109',
  ],
])
->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/batch-id/{batch_id}/details/detail-id/{detail_id}')->getAsync([
  'batch_id' => '131000011085109987515042023022300246500006',
  'detail_id' => '132000011085109987515042023022300246521006',
  'query' => [
    'sub_mchid' => '1900000109',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/platsolution/mch-transfer/batches/batch-id/{batch_id}/details/detail-id/{detail_id}']->getAsync([
  'batch_id' => '131000011085109987515042023022300246500006',
  'detail_id' => '132000011085109987515042023022300246521006',
  'query' => [
    'sub_mchid' => '1900000109',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->platsolution->mchTransfer->batches->batchId->_batch_id_->details->detailId->_detail_id_->get([
  'batch_id' => '131000011085109987515042023022300246500006',
  'detail_id' => '132000011085109987515042023022300246521006',
  'query' => [
    'sub_mchid' => '1900000109',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/platsolution/mch-transfer/batches/batch-id/{batch_id}/details/detail-id/{detail_id}')->get([
  'batch_id' => '131000011085109987515042023022300246500006',
  'detail_id' => '132000011085109987515042023022300246521006',
  'query' => [
    'sub_mchid' => '1900000109',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/platsolution/mch-transfer/batches/batch-id/{batch_id}/details/detail-id/{detail_id}']->get([
  'batch_id' => '131000011085109987515042023022300246500006',
  'detail_id' => '132000011085109987515042023022300246521006',
  'query' => [
    'sub_mchid' => '1900000109',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
out_batch_nostring商家批次单号
batch_idstring商家转账批次单号
out_detail_nostring商家明细单号
detail_idstring商家转账明细单号
sp_appidstring服务商应用ID
sub_mchidstring二级商户号
sub_appidstring二级商户应用ID
create_timestring转账发起时间
detail_statestring明细状态
transfer_amountnumber转账金额
transfer_remarkstring转账备注
fail_reasonstring明细失败原因
openidstring收款用户OpenID
bank_typestring收款银行类型
user_namestring收款用户姓名
transfer_finish_timestring转账完成时间
bank_refund_timestring银行退票时间

参阅 官方文档

Published on the GitHub by TheNorthMemory