Skip to content

企业商户查询企业员工开通授权状态

企业商户查询企业员工开通授权状态。该接口允许服务商查询指定出资子商户下特定员工的企业支付授权状态,包括授权状态、授权时间和解除授权时间等信息。服务商可通过此接口确认员工是否已开通企业支付功能,是后续发放额度卡的前提条件。

请求参数类型描述
user_idstring企业员工ID
queryobject声明请求的查询参数
sp_mchidstring服务商商户号
sub_mchidstring出资子商户号
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();
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();
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();
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));
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));
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));
返回字典类型描述
sp_mchidstring服务商商户号
sub_mchidstring出资子商户号
user_idstring企业员工ID
employee_listobject[]微信授权关系列表
employee_idstring微信授权关系ID
authorization_statestring授权状态
AUTHORIZED | REVOKED 枚举值之一
authorization_timestring授权时间
authorization_revoked_timestring解除授权时间

参阅 官方文档

Published on the GitHub by TheNorthMemory