Skip to content

企业商户发起员工开通企业支付授权

企业商户发起员工开通企业支付授权。该接口允许服务商为指定出资子商户下的员工发起企业支付授权申请,系统将生成一个授权链接,员工可通过该链接完成授权操作。授权成功后,企业可为该员工下发企业支付额度卡,员工可使用额度卡进行支付。

请求参数类型描述
user_idstring企业员工ID
jsonobject声明请求的JSON数据结构
sp_mchidstring服务商商户号
sub_mchidstring出资子商户号
application_typestring发起授权应用类型
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();
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();
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();
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));
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));
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));
返回字典类型描述
sp_mchidstring服务商商户号
sub_mchidstring出资子商户号
user_idstring企业员工ID
authorization_urlstring跳转链接
expire_timestring链接失效时间
application_typestring发起授权应用类型
H5 | MINIPROGRAM 枚举值之一
mp_querystring小程序查询参数
mp_business_typestring小程序业务类型

参阅 官方文档

Published on the GitHub by TheNorthMemory