查询结算资金明细
商户在交易完结之后,可按结算日期查询已结算资金明细(sette_state为SETTLED),也可以查询未结算资金明细(sette_state为UNSETTLE)。
🔰
本接口服务已于 2022.09.08
(北京时间)发布新版,新接口见这里,此文档仅做留存参考。
请求参数 | 类型 | 描述 |
---|---|---|
base_uri | string | 声明接入点https://api.mch.weixin.qq.com/hk/ (国内接入) |
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->settle->settlements->getAsync([
'base_uri' => 'https://api.mch.weixin.qq.com/hk/', // 接入点(国内接入)
'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/settle/settlements')->getAsync([
'base_uri' => 'https://api.mch.weixin.qq.com/hk/', // 接入点(国内接入)
'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/settle/settlements']->getAsync([
'base_uri' => 'https://api.mch.weixin.qq.com/hk/', // 接入点(国内接入)
'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->settle->settlements->get([
'base_uri' => 'https://api.mch.weixin.qq.com/hk/', // 接入点(国内接入)
'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/settle/settlements')->get([
'base_uri' => 'https://api.mch.weixin.qq.com/hk/', // 接入点(国内接入)
'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/settle/settlements']->get([
'base_uri' => 'https://api.mch.weixin.qq.com/hk/', // 接入点(国内接入)
'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 | 钱包主体CHINA_MAINLAND | CHINA_HONGKONG 枚举值之一 |
total_count | integer | 总记录条数 |
offset | integer | 记录起始位置 |
limit | integer | 本次返回条数 |
参阅 官方文档