企业商户发起员工开通企业支付授权
企业商户发起员工开通企业支付授权。该接口允许服务商为指定出资子商户下的员工发起企业支付授权申请,系统将生成一个授权链接,员工可通过该链接完成授权操作。授权成功后,企业可为该员工下发企业支付额度卡,员工可使用额度卡进行支付。
请求参数 | 类型 | 描述 |
---|---|---|
user_id | string | 企业员工ID |
json | object | 声明请求的JSON 数据结构 |
sp_mchid | string | 服务商商户号 |
sub_mchid | string | 出资子商户号 |
application_type | string | 发起授权应用类型H5 | MINIPROGRAM 枚举值之一 |
php
$instance->v3->webizpay->users->_user_id_->authorizationUrl->postAsync([
'user_id' => '123456',
'json' => [
'sp_mchid' => '12341234',
'sub_mchid' => '43214321',
'application_type' => 'H5',
],
])
->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
12
2
3
4
5
6
7
8
9
10
11
12
php
$instance->chain('v3/webizpay/users/{user_id}/authorization-url')->postAsync([
'user_id' => '123456',
'json' => [
'sp_mchid' => '12341234',
'sub_mchid' => '43214321',
'application_type' => 'H5',
],
])
->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
12
2
3
4
5
6
7
8
9
10
11
12
php
$instance['v3/webizpay/users/{user_id}/authorization-url']->postAsync([
'user_id' => '123456',
'json' => [
'sp_mchid' => '12341234',
'sub_mchid' => '43214321',
'application_type' => 'H5',
],
])
->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
12
2
3
4
5
6
7
8
9
10
11
12
php
$response = $instance->v3->webizpay->users->_user_id_->authorizationUrl->post([
'user_id' => '123456',
'json' => [
'sp_mchid' => '12341234',
'sub_mchid' => '43214321',
'application_type' => 'H5',
],
]);
print_r(json_decode((string) $response->getBody(), true));
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
php
$response = $instance->chain('v3/webizpay/users/{user_id}/authorization-url')->post([
'user_id' => '123456',
'json' => [
'sp_mchid' => '12341234',
'sub_mchid' => '43214321',
'application_type' => 'H5',
],
]);
print_r(json_decode((string) $response->getBody(), true));
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
php
$response = $instance['v3/webizpay/users/{user_id}/authorization-url']->post([
'user_id' => '123456',
'json' => [
'sp_mchid' => '12341234',
'sub_mchid' => '43214321',
'application_type' => 'H5',
],
]);
print_r(json_decode((string) $response->getBody(), true));
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
返回字典 | 类型 | 描述 |
---|---|---|
sp_mchid | string | 服务商商户号 |
sub_mchid | string | 出资子商户号 |
user_id | string | 企业员工ID |
authorization_url | string | 跳转链接 |
expire_time | string | 链接失效时间 |
application_type | string | 发起授权应用类型H5 | MINIPROGRAM 枚举值之一 |
mp_query | string | 小程序查询参数 |
mp_business_type | string | 小程序业务类型 |
参阅 官方文档