Skip to content

获取邀请商户开通服务商电子发票能力

服务商通过填写发票模式,发票开通能力等信息,获取邀请商户开通服务商电子发票能力的链接,展示给商户,进行授权开通服务商电子发票能力。

请求参数类型描述
queryobject声明请求的查询参数
operation_typestring操作类型
AUTH_BINDING 枚举值
fapiao_modestring开票模式
THIRD_OR_SELF_FAPIAO | TENCENT_DIGITAL_TAX 枚举值之一
fapiao_ability_type_liststring[]发票能力类型
BASE_ABILITY | REAL_ESTATE_ABILITY 枚举值之一
invite_channelstring服务商邀请渠道
operate_userstring操作人员
invite_codestring服务商邀请code
sub_mchidstring子商户号
headersobject声明请求的头参数
Wechatpay-Serialstring微信支付公钥ID/平台证书序列号
php
$instance->v3->newTaxControlFapiao->fapiaomerchant->getspinviteurl->getAsync([
  'query' => [
    'operation_type'           => 'AUTH_BINDING',
    'fapiao_mode'              => 'THIRD_OR_SELF_FAPIAO',
    'fapiao_ability_type_list' => 'BASE_ABILITY',
    'invite_channel'           => 'miniprogram',
    'operate_user'             => 'mI7HGEJ4Q2B91IGjHZu/Gthm',
    'invite_code'              => 'code_20200101_123',
    'sub_mchid'                => '1900000109',
  ],
  'headers' => [
    'Wechatpay-Serial' => 'PUB_KEY_ID_0114232134912410000000000000',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/new-tax-control-fapiao/fapiaomerchant/getspinviteurl')->getAsync([
  'query' => [
    'operation_type'           => 'AUTH_BINDING',
    'fapiao_mode'              => 'THIRD_OR_SELF_FAPIAO',
    'fapiao_ability_type_list' => 'BASE_ABILITY',
    'invite_channel'           => 'miniprogram',
    'operate_user'             => 'mI7HGEJ4Q2B91IGjHZu/Gthm',
    'invite_code'              => 'code_20200101_123',
    'sub_mchid'                => '1900000109',
  ],
  'headers' => [
    'Wechatpay-Serial' => 'PUB_KEY_ID_0114232134912410000000000000',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/new-tax-control-fapiao/fapiaomerchant/getspinviteurl']->getAsync([
  'query' => [
    'operation_type'           => 'AUTH_BINDING',
    'fapiao_mode'              => 'THIRD_OR_SELF_FAPIAO',
    'fapiao_ability_type_list' => 'BASE_ABILITY',
    'invite_channel'           => 'miniprogram',
    'operate_user'             => 'mI7HGEJ4Q2B91IGjHZu/Gthm',
    'invite_code'              => 'code_20200101_123',
    'sub_mchid'                => '1900000109',
  ],
  'headers' => [
    'Wechatpay-Serial' => 'PUB_KEY_ID_0114232134912410000000000000',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->newTaxControlFapiao->fapiaomerchant->getspinviteurl->get([
  'query' => [
    'operation_type'           => 'AUTH_BINDING',
    'fapiao_mode'              => 'THIRD_OR_SELF_FAPIAO',
    'fapiao_ability_type_list' => 'BASE_ABILITY',
    'invite_channel'           => 'miniprogram',
    'operate_user'             => 'mI7HGEJ4Q2B91IGjHZu/Gthm',
    'invite_code'              => 'code_20200101_123',
    'sub_mchid'                => '1900000109',
  ],
  'headers' => [
    'Wechatpay-Serial' => 'PUB_KEY_ID_0114232134912410000000000000',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/new-tax-control-fapiao/fapiaomerchant/getspinviteurl')->get([
  'query' => [
    'operation_type'           => 'AUTH_BINDING',
    'fapiao_mode'              => 'THIRD_OR_SELF_FAPIAO',
    'fapiao_ability_type_list' => 'BASE_ABILITY',
    'invite_channel'           => 'miniprogram',
    'operate_user'             => 'mI7HGEJ4Q2B91IGjHZu/Gthm',
    'invite_code'              => 'code_20200101_123',
    'sub_mchid'                => '1900000109',
  ],
  'headers' => [
    'Wechatpay-Serial' => 'PUB_KEY_ID_0114232134912410000000000000',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/new-tax-control-fapiao/fapiaomerchant/getspinviteurl']->get([
  'query' => [
    'operation_type'           => 'AUTH_BINDING',
    'fapiao_mode'              => 'THIRD_OR_SELF_FAPIAO',
    'fapiao_ability_type_list' => 'BASE_ABILITY',
    'invite_channel'           => 'miniprogram',
    'operate_user'             => 'mI7HGEJ4Q2B91IGjHZu/Gthm',
    'invite_code'              => 'code_20200101_123',
    'sub_mchid'                => '1900000109',
  ],
  'headers' => [
    'Wechatpay-Serial' => 'PUB_KEY_ID_0114232134912410000000000000',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
invite_urlstring邀请开通二维码链接
miniprogram_appidstring开通小程序AppID
miniprogram_pathstring开通小程序跳转路径

参阅 官方文档

Published on the GitHub by TheNorthMemory