Skip to content

查询结算资金明细

商户在交易完结之后,可按结算日期查询已结算资金明细(sette_state为SETTLED),也可以查询未结算资金明细(sette_state为UNSETTLE)。

请求参数类型描述
base_uristring声明接入点https://apihk.mch.weixin.qq.com/(香港接入)
queryobject声明请求的查询参数
sub_mchidstring子商户号
settle_statestring结算状态
SETTLED | UNSETTLE 枚举值之一
settle_start_datestring结算开始日期
settle_end_datestring结算结束日期
limitinteger最大记录条数
offsetinteger记录起始位置
php
$instance->v3->global->settle->settlements->getAsync([
  'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
  'query' => [
    'sub_mchid' => '1900000101',
    'settle_state' => 'SETTLED',
    'settle_start_date' => '20091225',
    'settle_end_date' => '20091226',
    'limit' => 5,
    'offset' => 10,
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/global/settle/settlements')->getAsync([
  'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
  'query' => [
    'sub_mchid' => '1900000101',
    'settle_state' => 'SETTLED',
    'settle_start_date' => '20091225',
    'settle_end_date' => '20091226',
    'limit' => 5,
    'offset' => 10,
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/global/settle/settlements']->getAsync([
  'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
  'query' => [
    'sub_mchid' => '1900000101',
    'settle_state' => 'SETTLED',
    'settle_start_date' => '20091225',
    'settle_end_date' => '20091226',
    'limit' => 5,
    'offset' => 10,
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->global->settle->settlements->get([
  'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
  'query' => [
    'sub_mchid' => '1900000101',
    'settle_state' => 'SETTLED',
    'settle_start_date' => '20091225',
    'settle_end_date' => '20091226',
    'limit' => 5,
    'offset' => 10,
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/global/settle/settlements')->get([
  'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
  'query' => [
    'sub_mchid' => '1900000101',
    'settle_state' => 'SETTLED',
    'settle_start_date' => '20091225',
    'settle_end_date' => '20091226',
    'limit' => 5,
    'offset' => 10,
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/global/settle/settlements']->get([
  'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
  'query' => [
    'sub_mchid' => '1900000101',
    'settle_state' => 'SETTLED',
    'settle_start_date' => '20091225',
    'settle_end_date' => '20091226',
    'limit' => 5,
    'offset' => 10,
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
dataobject[]结算信息列表
batch_idstring付款批次号
settlement_datestring结算日期
trade_start_datestring交易开始日期
trade_end_datestring交易结束日期
amountobject金额
settledinteger已结算金额
unsettleinteger未结算金额
currencystring结算币种
payinteger支付金额
refundinteger退款金额
netinteger支付净额
feeinteger手续费金额
wallet_regionstring钱包主体
total_countinteger总记录条数
offsetinteger记录起始位置
limitinteger本次返回条数

参阅 官方文档

Published on the GitHub by TheNorthMemory