查询二级商户账户实时余额
服务商通过此接口可以查询特约商户账户余额信息。
请求参数 | 类型 | 描述 |
---|---|---|
sub_mchid | string | 二级商户号 |
query | object | 声明请求的查询参数 |
account_type | string | 资金账户类型BASIC | OPERATION | FEES | DEPOSIT 枚举值之一 |
php
$instance->v3->ecommerce->fund->balance->_sub_mchid_->getAsync([
'sub_mchid' => '1900000109',
'query' => [
'account_type' => 'BASIC',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/ecommerce/fund/balance/{sub_mchid}')->getAsync([
'sub_mchid' => '1900000109',
'query' => [
'account_type' => 'BASIC',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/ecommerce/fund/balance/{sub_mchid}']->getAsync([
'sub_mchid' => '1900000109',
'query' => [
'account_type' => 'BASIC',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->ecommerce->fund->balance->_sub_mchid_->get([
'sub_mchid' => '1900000109',
'query' => [
'account_type' => 'BASIC',
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/ecommerce/fund/balance/{sub_mchid}')->get([
'sub_mchid' => '1900000109',
'query' => [
'account_type' => 'BASIC',
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/ecommerce/fund/balance/{sub_mchid}']->get([
'sub_mchid' => '1900000109',
'query' => [
'account_type' => 'BASIC',
],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典 | 类型 | 描述 |
---|---|---|
sub_mchid | string | 特约商户号 |
available_amount | integer | 可用余额 |
pending_amount | integer | 不可用余额 |