企业商户查询企业员工开通授权状态
企业商户查询企业员工开通授权状态。该接口允许服务商查询指定出资子商户下特定员工的企业支付授权状态,包括授权状态、授权时间和解除授权时间等信息。服务商可通过此接口确认员工是否已开通企业支付功能,是后续发放额度卡的前提条件。
请求参数 | 类型 | 描述 |
---|---|---|
user_id | string | 企业员工ID |
query | object | 声明请求的查询参数 |
sp_mchid | string | 服务商商户号 |
sub_mchid | string | 出资子商户号 |
php
$instance->v3->webizpay->users->_user_id_->authorizationState->getAsync([
'user_id' => '123456',
'query' => [
'sp_mchid' => '12341234',
'sub_mchid' => '43214321',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
php
$instance->chain('v3/webizpay/users/{user_id}/authorization-state')->getAsync([
'user_id' => '123456',
'query' => [
'sp_mchid' => '12341234',
'sub_mchid' => '43214321',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
php
$instance['v3/webizpay/users/{user_id}/authorization-state']->getAsync([
'user_id' => '123456',
'query' => [
'sp_mchid' => '12341234',
'sub_mchid' => '43214321',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
php
$response = $instance->v3->webizpay->users->_user_id_->authorizationState->get([
'user_id' => '123456',
'query' => [
'sp_mchid' => '12341234',
'sub_mchid' => '43214321',
],
]);
print_r(json_decode((string) $response->getBody(), true));
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
php
$response = $instance->chain('v3/webizpay/users/{user_id}/authorization-state')->get([
'user_id' => '123456',
'query' => [
'sp_mchid' => '12341234',
'sub_mchid' => '43214321',
],
]);
print_r(json_decode((string) $response->getBody(), true));
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
php
$response = $instance['v3/webizpay/users/{user_id}/authorization-state']->get([
'user_id' => '123456',
'query' => [
'sp_mchid' => '12341234',
'sub_mchid' => '43214321',
],
]);
print_r(json_decode((string) $response->getBody(), true));
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
返回字典 | 类型 | 描述 |
---|---|---|
sp_mchid | string | 服务商商户号 |
sub_mchid | string | 出资子商户号 |
user_id | string | 企业员工ID |
employee_list | object[] | 微信授权关系列表 |
employee_id | string | 微信授权关系ID |
authorization_state | string | 授权状态AUTHORIZED | REVOKED 枚举值之一 |
authorization_time | string | 授权时间 |
authorization_revoked_time | string | 解除授权时间 |
参阅 官方文档