进件子商户 
机构提交子商户资料,微信支付系统会为每个子商户创建子商户号。
| 请求参数 | 类型 | 描述 | 
|---|---|---|
| addinstitutionsub | string | 固定值addInstitutionsub | 
| security | true | 声明加载商户API证书 | 
| nonceless | true | 声明请求的XML无随机字符串参数 | 
| xml | object | 声明请求的XML数据结构 | 
| app_id | string | 机构appid | 
| mch_id | string | 机构商户号 | 
| channel_id | string | 渠道编号 | 
| merchant_name | string | 子商户全称 | 
| merchant_shortname | string | 子商户简称 | 
| merchant_remark | string | 子商户唯一标识 | 
| merchant_country_code | string | 注册国家或区域 | 
| merchant_type | string | 商户类型ENTERPRISE | INDIVIDUAL 枚举值之一 | 
| business_category | string | 业务类目 | 
| mcc | string | MCC码 | 
| registration_certificate_number | string | 公司注册文件编号 | 
| registration_certificate_date | string | 公司注册文件过期时间 | 
| registration_certificate_copy | string | 公司注册文件照片 | 
| business_type | string | 业务类型ONLINE | OFFLINE | BOTH 枚举值之一 | 
| app_download | string | APP下载链接 | 
| business_website | string | 业务网站 | 
| office_account | string | 公众号 | 
| mini_program | string | 小程序 | 
| store_address | string | 门店地址 | 
| store_photos | string | 门店照片 | 
| media_id | string[] | 门店照片列表 | 
| director_name | string | 董事姓名 | 
| director_id_number | string | 董事证件号码 | 
| principal_name | string | 负责人姓名 | 
| principal_id_number | string | 负责人证件号 | 
| office_phone | string | 公司电话 | 
| contact_name | string | 联系人姓名 | 
| contact_phone | string | 联系人电话 | 
| contact_email | string | 联系人邮箱 | 
| settlement_bank_number | string | 子商户结算银行账户 | 
| apply_h5_payment | string | 是否申请H5支付权限YES | NO 枚举值之一 | 
| h5_website_url | string | H5经营网址 | 
| h5_domains | string | H5支付域名 | 
| domain | string[] | 域名列表 | 
php
$instance->v2->secapi->mch->_addinstitutionsub_->postAsync([
  'addinstitutionsub' => 'addInstitutionsub', // 固定参数(URI上有大写字符)
  'security' => true,
  'nonceless' => true,
  'xml' => [
    'app_id'                          => 'wx8888888888888888',
    'mch_id'                          => '3200000001',
    'channel_id'                      => '101',
    'merchant_name'                   => 'Merchantname',
    'merchant_shortname'              => 'Merchantshortname',
    'merchant_remark'                 => 'ABC123456',
    'merchant_country_code'           => '344',
    'merchant_type'                   => 'ENTERPRISE',
    'business_category'               => '343',
    'mcc'                             => '4214',
    'registration_certificate_number' => '5555-8888',
    'registration_certificate_date'   => '2020-10-16',
    'registration_certificate_copy'   => 'aoGhHuxkrIaqB4GzPCeo963zXKcO2hDVD8AjXIpgrj',
    'business_type'                   => 'BOTH',
    'app_download'                    => 'https://download.qq.com',
    'business_website'                => 'https://www.qq.com',
    'office_account'                  => 'wx8888888888888888',
    'mini_program'                    => 'wx8888888888888888',
    'store_address'                   => '广东省深圳市南山区科技中一道10000号',
    'store_photos'                    => \json_encode([
      'ySdrxMVb92Rmf9p2n7aJ4nAkJsqjYAt8uWQxBQ_p2Jgs',
      'ySdVr5RR9cPRAq5FS0BKJxc78190x27psCzAwNzi6VdEI',
      'yS2xjJ9lhuVwUyQbq0AYmP80p50vVuhdSjsKM',
    ]),
    'director_name'                   => 'BobZhang',
    'director_id_number'              => '5555—8888',
    'principal_name'                  => 'BobZhang',
    'principal_id_number'             => '5555—8888',
    'office_phone'                    => '075586010000',
    'contact_name'                    => '李先生',
    'contact_phone'                   => '075586010000',
    'contact_email'                   => 'test@test.com',
    'settlement_bank_number'          => '555588889999',
    'apply_h5_payment'                => 'YES',
    'h5_website_url'                  => 'https://qq.com',
    'h5_domains'                      => \json_encode([
      'www.qq.com',
      'www.weixin.com',
    ]),
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();php
$instance->chain('v2/secapi/mch/{addinstitutionsub}')->postAsync([
  'addinstitutionsub' => 'addInstitutionsub', // 固定参数(URI上有大写字符)
  'security' => true,
  'nonceless' => true,
  'xml' => [
    'app_id'                          => 'wx8888888888888888',
    'mch_id'                          => '3200000001',
    'channel_id'                      => '101',
    'merchant_name'                   => 'Merchantname',
    'merchant_shortname'              => 'Merchantshortname',
    'merchant_remark'                 => 'ABC123456',
    'merchant_country_code'           => '344',
    'merchant_type'                   => 'ENTERPRISE',
    'business_category'               => '343',
    'mcc'                             => '4214',
    'registration_certificate_number' => '5555-8888',
    'registration_certificate_date'   => '2020-10-16',
    'registration_certificate_copy'   => 'aoGhHuxkrIaqB4GzPCeo963zXKcO2hDVD8AjXIpgrj',
    'business_type'                   => 'BOTH',
    'app_download'                    => 'https://download.qq.com',
    'business_website'                => 'https://www.qq.com',
    'office_account'                  => 'wx8888888888888888',
    'mini_program'                    => 'wx8888888888888888',
    'store_address'                   => '广东省深圳市南山区科技中一道10000号',
    'store_photos'                    => \json_encode([
      'ySdrxMVb92Rmf9p2n7aJ4nAkJsqjYAt8uWQxBQ_p2Jgs',
      'ySdVr5RR9cPRAq5FS0BKJxc78190x27psCzAwNzi6VdEI',
      'yS2xjJ9lhuVwUyQbq0AYmP80p50vVuhdSjsKM',
    ]),
    'director_name'                   => 'BobZhang',
    'director_id_number'              => '5555—8888',
    'principal_name'                  => 'BobZhang',
    'principal_id_number'             => '5555—8888',
    'office_phone'                    => '075586010000',
    'contact_name'                    => '李先生',
    'contact_phone'                   => '075586010000',
    'contact_email'                   => 'test@test.com',
    'settlement_bank_number'          => '555588889999',
    'apply_h5_payment'                => 'YES',
    'h5_website_url'                  => 'https://qq.com',
    'h5_domains'                      => \json_encode([
      'www.qq.com',
      'www.weixin.com',
    ]),
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();php
$instance['v2/secapi/mch/{addinstitutionsub}']->postAsync([
  'addinstitutionsub' => 'addInstitutionsub', // 固定参数(URI上有大写字符)
  'security' => true,
  'nonceless' => true,
  'xml' => [
    'app_id'                          => 'wx8888888888888888',
    'mch_id'                          => '3200000001',
    'channel_id'                      => '101',
    'merchant_name'                   => 'Merchantname',
    'merchant_shortname'              => 'Merchantshortname',
    'merchant_remark'                 => 'ABC123456',
    'merchant_country_code'           => '344',
    'merchant_type'                   => 'ENTERPRISE',
    'business_category'               => '343',
    'mcc'                             => '4214',
    'registration_certificate_number' => '5555-8888',
    'registration_certificate_date'   => '2020-10-16',
    'registration_certificate_copy'   => 'aoGhHuxkrIaqB4GzPCeo963zXKcO2hDVD8AjXIpgrj',
    'business_type'                   => 'BOTH',
    'app_download'                    => 'https://download.qq.com',
    'business_website'                => 'https://www.qq.com',
    'office_account'                  => 'wx8888888888888888',
    'mini_program'                    => 'wx8888888888888888',
    'store_address'                   => '广东省深圳市南山区科技中一道10000号',
    'store_photos'                    => \json_encode([
      'ySdrxMVb92Rmf9p2n7aJ4nAkJsqjYAt8uWQxBQ_p2Jgs',
      'ySdVr5RR9cPRAq5FS0BKJxc78190x27psCzAwNzi6VdEI',
      'yS2xjJ9lhuVwUyQbq0AYmP80p50vVuhdSjsKM',
    ]),
    'director_name'                   => 'BobZhang',
    'director_id_number'              => '5555—8888',
    'principal_name'                  => 'BobZhang',
    'principal_id_number'             => '5555—8888',
    'office_phone'                    => '075586010000',
    'contact_name'                    => '李先生',
    'contact_phone'                   => '075586010000',
    'contact_email'                   => 'test@test.com',
    'settlement_bank_number'          => '555588889999',
    'apply_h5_payment'                => 'YES',
    'h5_website_url'                  => 'https://qq.com',
    'h5_domains'                      => \json_encode([
      'www.qq.com',
      'www.weixin.com',
    ]),
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();php
$response = $instance->v2->secapi->mch->_addinstitutionsub_->post([
  'addinstitutionsub' => 'addInstitutionsub', // 固定参数(URI上有大写字符)
  'security' => true,
  'nonceless' => true,
  'xml' => [
    'app_id'                          => 'wx8888888888888888',
    'mch_id'                          => '3200000001',
    'channel_id'                      => '101',
    'merchant_name'                   => 'Merchantname',
    'merchant_shortname'              => 'Merchantshortname',
    'merchant_remark'                 => 'ABC123456',
    'merchant_country_code'           => '344',
    'merchant_type'                   => 'ENTERPRISE',
    'business_category'               => '343',
    'mcc'                             => '4214',
    'registration_certificate_number' => '5555-8888',
    'registration_certificate_date'   => '2020-10-16',
    'registration_certificate_copy'   => 'aoGhHuxkrIaqB4GzPCeo963zXKcO2hDVD8AjXIpgrj',
    'business_type'                   => 'BOTH',
    'app_download'                    => 'https://download.qq.com',
    'business_website'                => 'https://www.qq.com',
    'office_account'                  => 'wx8888888888888888',
    'mini_program'                    => 'wx8888888888888888',
    'store_address'                   => '广东省深圳市南山区科技中一道10000号',
    'store_photos'                    => \json_encode([
      'ySdrxMVb92Rmf9p2n7aJ4nAkJsqjYAt8uWQxBQ_p2Jgs',
      'ySdVr5RR9cPRAq5FS0BKJxc78190x27psCzAwNzi6VdEI',
      'yS2xjJ9lhuVwUyQbq0AYmP80p50vVuhdSjsKM',
    ]),
    'director_name'                   => 'BobZhang',
    'director_id_number'              => '5555—8888',
    'principal_name'                  => 'BobZhang',
    'principal_id_number'             => '5555—8888',
    'office_phone'                    => '075586010000',
    'contact_name'                    => '李先生',
    'contact_phone'                   => '075586010000',
    'contact_email'                   => 'test@test.com',
    'settlement_bank_number'          => '555588889999',
    'apply_h5_payment'                => 'YES',
    'h5_website_url'                  => 'https://qq.com',
    'h5_domains'                      => \json_encode([
      'www.qq.com',
      'www.weixin.com',
    ]),
  ],
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));php
$response = $instance->chain('v2/secapi/mch/{addinstitutionsub}')->post([
  'addinstitutionsub' => 'addInstitutionsub', // 固定参数(URI上有大写字符)
  'security' => true,
  'nonceless' => true,
  'xml' => [
    'app_id'                          => 'wx8888888888888888',
    'mch_id'                          => '3200000001',
    'channel_id'                      => '101',
    'merchant_name'                   => 'Merchantname',
    'merchant_shortname'              => 'Merchantshortname',
    'merchant_remark'                 => 'ABC123456',
    'merchant_country_code'           => '344',
    'merchant_type'                   => 'ENTERPRISE',
    'business_category'               => '343',
    'mcc'                             => '4214',
    'registration_certificate_number' => '5555-8888',
    'registration_certificate_date'   => '2020-10-16',
    'registration_certificate_copy'   => 'aoGhHuxkrIaqB4GzPCeo963zXKcO2hDVD8AjXIpgrj',
    'business_type'                   => 'BOTH',
    'app_download'                    => 'https://download.qq.com',
    'business_website'                => 'https://www.qq.com',
    'office_account'                  => 'wx8888888888888888',
    'mini_program'                    => 'wx8888888888888888',
    'store_address'                   => '广东省深圳市南山区科技中一道10000号',
    'store_photos'                    => \json_encode([
      'ySdrxMVb92Rmf9p2n7aJ4nAkJsqjYAt8uWQxBQ_p2Jgs',
      'ySdVr5RR9cPRAq5FS0BKJxc78190x27psCzAwNzi6VdEI',
      'yS2xjJ9lhuVwUyQbq0AYmP80p50vVuhdSjsKM',
    ]),
    'director_name'                   => 'BobZhang',
    'director_id_number'              => '5555—8888',
    'principal_name'                  => 'BobZhang',
    'principal_id_number'             => '5555—8888',
    'office_phone'                    => '075586010000',
    'contact_name'                    => '李先生',
    'contact_phone'                   => '075586010000',
    'contact_email'                   => 'test@test.com',
    'settlement_bank_number'          => '555588889999',
    'apply_h5_payment'                => 'YES',
    'h5_website_url'                  => 'https://qq.com',
    'h5_domains'                      => \json_encode([
      'www.qq.com',
      'www.weixin.com',
    ]),
  ],
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));php
$response = $instance['v2/secapi/mch/{addinstitutionsub}']->post([
  'addinstitutionsub' => 'addInstitutionsub', // 固定参数(URI上有大写字符)
  'security' => true,
  'nonceless' => true,
  'xml' => [
    'app_id'                          => 'wx8888888888888888',
    'mch_id'                          => '3200000001',
    'channel_id'                      => '101',
    'merchant_name'                   => 'Merchantname',
    'merchant_shortname'              => 'Merchantshortname',
    'merchant_remark'                 => 'ABC123456',
    'merchant_country_code'           => '344',
    'merchant_type'                   => 'ENTERPRISE',
    'business_category'               => '343',
    'mcc'                             => '4214',
    'registration_certificate_number' => '5555-8888',
    'registration_certificate_date'   => '2020-10-16',
    'registration_certificate_copy'   => 'aoGhHuxkrIaqB4GzPCeo963zXKcO2hDVD8AjXIpgrj',
    'business_type'                   => 'BOTH',
    'app_download'                    => 'https://download.qq.com',
    'business_website'                => 'https://www.qq.com',
    'office_account'                  => 'wx8888888888888888',
    'mini_program'                    => 'wx8888888888888888',
    'store_address'                   => '广东省深圳市南山区科技中一道10000号',
    'store_photos'                    => \json_encode([
      'ySdrxMVb92Rmf9p2n7aJ4nAkJsqjYAt8uWQxBQ_p2Jgs',
      'ySdVr5RR9cPRAq5FS0BKJxc78190x27psCzAwNzi6VdEI',
      'yS2xjJ9lhuVwUyQbq0AYmP80p50vVuhdSjsKM',
    ]),
    'director_name'                   => 'BobZhang',
    'director_id_number'              => '5555—8888',
    'principal_name'                  => 'BobZhang',
    'principal_id_number'             => '5555—8888',
    'office_phone'                    => '075586010000',
    'contact_name'                    => '李先生',
    'contact_phone'                   => '075586010000',
    'contact_email'                   => 'test@test.com',
    'settlement_bank_number'          => '555588889999',
    'apply_h5_payment'                => 'YES',
    'h5_website_url'                  => 'https://qq.com',
    'h5_domains'                      => \json_encode([
      'www.qq.com',
      'www.weixin.com',
    ]),
  ],
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));| 返回字典 | 类型 | 描述 | 
|---|---|---|
| return_code | string | 返回状态码SUCCESS | FAIL 枚举值之一 | 
| return_msg | string | 返回信息 | 
| result_code | string | 业务返回码SUCCESS | FAIL 枚举值之一 | 
| err_code | string | 错误编码 | 
| err_code_des | string | 错误描述 | 
| sub_mch_id | string | 子商户号 | 
| sign | string | 签名 | 
| verification_status | string | 验证状态Under review | Approved 枚举值之一 | 
| description | string | 验证状态描述 | 
| h5_authorization_state | string | H5支付权限状态APPROVED | UNAUTHORIZED | UNDER_REVIEW | REJECTED | UNDER_PUNISHMENT | APPLICATION_FAILED 枚举值之一 | 
参阅 官方文档