Skip to content

检查子商户开票功能状态

服务商检查子商户的电子发票功能状态是否正常,若商户已经开通API开票功能并已对服务商授权,则返回成功。

请求参数类型描述
sub_mchidstring子商户号
php
$instance->v3->newTaxControlFapiao->merchant->_sub_mchid_->checkStatus->getAsync([
  'sub_mchid' => '1900000109',
])
->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/merchant/{sub_mchid}/check-status')->getAsync([
  'sub_mchid' => '1900000109',
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/new-tax-control-fapiao/merchant/{sub_mchid}/check-status']->getAsync([
  'sub_mchid' => '1900000109',
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->newTaxControlFapiao->merchant->_sub_mchid_->checkStatus->get([
  'sub_mchid' => '1900000109',
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/new-tax-control-fapiao/merchant/{sub_mchid}/check-status')->get([
  'sub_mchid' => '1900000109',
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/new-tax-control-fapiao/merchant/{sub_mchid}/check-status']->get([
  'sub_mchid' => '1900000109',
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
sub_mchidstring子商户号
third_modeobject第三方开票模式
statusstring第三方/自建发票能力接入状态
DISABLED | ENABLED 枚举值之一
digital_tax_modeobject数电发票模式
statusstring接入状态
APPROVAL_PENDING | ACCESS_CONFIRMED_PENDING | ABILITY_CONFIRMED_PENDING | BILLING_PERSON_REGISTER_PENDING | BILLING_PERSON_CONFIRMED_PENDING | SECURITY_SETTING_PENDING | APPLY_FAILED | DISABLED | ENABLED | RESOURCE_EXPIRED 枚举值之一
billing_person_infoobject开票人信息
idstring开票人ID
namestring开票人姓名
access_timestring接入时间
expired_timestring过期时间
access_fail_reasonstring接入失败原因
ability_infoobject[]能力信息
typestring能力类型
BASE_ABILITY | REAL_ESTATE_ABILITY 枚举值之一
statusstring能力授权状态
AUTHORIZED | AUTHORIZE_PENDING | DEAUTHORIZED | AUTHORIZE_FAILED 枚举值之一
authorize_fail_reasonstring能力授权失败原因

参阅 官方文档

Published on the GitHub by TheNorthMemory