查询结算资金明细
商户在交易完结之后,可按结算日期查询已结算资金明细(sette_state为SETTLED),也可以查询未结算资金明细(sette_state为UNSETTLE)。
请求参数 | 类型 | 描述 |
---|---|---|
base_uri | string | 声明接入点https://apihk.mch.weixin.qq.com/ (香港接入) |
query | object | 声明请求的查询参数 |
sub_mchid | string | 子商户号 |
settle_state | string | 结算状态SETTLED | UNSETTLE 枚举值之一 |
settle_start_date | string | 结算开始日期 |
settle_end_date | string | 结算结束日期 |
limit | integer | 最大记录条数 |
offset | integer | 记录起始位置 |
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));
返回字典 | 类型 | 描述 |
---|---|---|
data | object[] | 结算信息列表 |
batch_id | string | 付款批次号 |
settlement_date | string | 结算日期 |
trade_start_date | string | 交易开始日期 |
trade_end_date | string | 交易结束日期 |
amount | object | 金额 |
settled | integer | 已结算金额 |
unsettle | integer | 未结算金额 |
currency | string | 结算币种 |
pay | integer | 支付金额 |
refund | integer | 退款金额 |
net | integer | 支付净额 |
fee | integer | 手续费金额 |
wallet_region | string | 钱包主体 |
total_count | integer | 总记录条数 |
offset | integer | 记录起始位置 |
limit | integer | 本次返回条数 |
参阅 官方文档