---
url: "https://pay.weixin.qq.com/doc/v3/partner/4012713017-go.md"
title: "提交申请单-请求示例-go"
doc_id: 4012713017
example_lang: "go"
---

## Go


需配合微信支付工具库 wxpay\_utility 使用，请参考 [Go](https://pay.weixin.qq.com/doc/v3/partner/4015119446.md)

```
package main

import (
	"bytes"
	"demo/wxpay_utility" // 引用微信支付工具库，参考 https://pay.weixin.qq.com/doc/v3/partner/4015119446
	"encoding/json"
	"fmt"
	"net/http"
	"net/url"
)

func main() {
	// TODO: 请准备商户开发必要参数，参考：https://pay.weixin.qq.com/doc/v3/partner/4013080340
	config, err := wxpay_utility.CreateMchConfig(
		"19xxxxxxxx",                 // 商户号，是由微信支付系统生成并分配给每个商户的唯一标识符，商户号获取方式参考 https://pay.weixin.qq.com/doc/v3/partner/4013080340
		"1DDE55AD98Exxxxxxxxxx",      // 商户API证书序列号，如何获取请参考 https://pay.weixin.qq.com/doc/v3/partner/4013058924
		"/path/to/apiclient_key.pem", // 商户API证书私钥文件路径，本地文件路径
		"PUB_KEY_ID_xxxxxxxxxxxxx",   // 微信支付公钥ID，如何获取请参考 https://pay.weixin.qq.com/doc/v3/partner/4013038589
		"/path/to/wxp_pub.pem",       // 微信支付公钥文件路径，本地文件路径
	)
	if err != nil {
		fmt.Println(err)
		return
	}

	request := &SubmitReq{
		OutRequestNo:       wxpay_utility.String("APPLYMENT_00000000001"),
		OrganizationType:   wxpay_utility.String("2"),
		FinanceInstitution: wxpay_utility.Bool(true),
		BusinessLicenseInfo: &BusinessLicense{
			CertType:              CERTIFICATETYPE_CERTIFICATE_TYPE_2388.Ptr(),
			BusinessLicenseCopy:   wxpay_utility.String("47ZC6GC-vnrbEny__Ie_An5-tCpqxucuxi-vByf3Gjm7KE53JXvGy9tqZm2XAUf-4KGprrKhpVBDIUv0OF4wFNIO4kqg05InE4d2I6_H7I4"),
			BusinessLicenseNumber: wxpay_utility.String("123456789012345678"),
			MerchantName:          wxpay_utility.String("腾讯科技有限公司"),
			LegalPerson:           wxpay_utility.String("张三"),
			CompanyAddress:        wxpay_utility.String("深圳南山区科苑路"),
			BusinessTime:          wxpay_utility.String("[\"2014-01-01\",\"长期\"]"),
		},
		FinanceInstitutionInfo: &FinanceInstitutionInfo{
			FinanceType:        FINANCETYPE_BANK_AGENT.Ptr(),
			FinanceLicensePics: []string{"example_FinanceLicensePics"},
		},
		IdHolderType:        IDHOLDERTYPE_LEGAL.Ptr(),
		IdDocType:           IDENTIFICATIONTYPE_IDENTIFICATION_TYPE_MACAO.Ptr(),
		AuthorizeLetterCopy: wxpay_utility.String("47ZC6GC-vnrbEny_Ie_An5-tCpqxucuxi-vByf3Gjm7KEIUv0OF4wFNIO4kqg05InE4d2I6_H7I4"),
		IdCardInfo: &IdCardInfo{
			IdCardCopy:           wxpay_utility.String("jTpGmxUX3FBWVQ5NJTZvlKX_gdU4cRz7z5NxpnFuAxhBTEO_PvWkfSCJ3zVIn001D8daLC-ehEuo0BJqRTvDujqhThn4ReFxikqJ5YW6zFQ"),
			IdCardNational:       wxpay_utility.String("47ZC6GC-vnrbEny__Ie_An5-tCpqxucuxi-vByf3Gjm7KE53JXvGy9tqZm2XAUf-4KGprrKhpVBDIUv0OF4wFNIO4kqg05InE4d2I6_H7I4"),
			IdCardName:           wxpay_utility.String("pVd1HJ6zyvPedzGaV+X3qtmrq9bb9tPROvwia4ibL+F6mfjbzQIzfb3HHLEjZ4YiR/cJiCrZxnAqi+pjeKIEdkwzXRAI7FUhrfPK3SNjaBTEu9GmsugMIA9r3x887Q+ODuC8HH2nzAn7NGpE/e3yiHgWhk0ps5k5DP/2qIdGdONoDzZelrxCl/NWWNUyB93K9F+jC1JX2IMttdY+aQ6zBlw0xnOiNW6Hzy7UtC+xriudjD5APomty7/mYNxLMpRSvWKIjOv/69bDnuC4EL5Kz4jBHLiCyOb+tI0m2qhZ9evAM+Jv1z0NVa8MRtelw/wDa4SzfeespQO/0kjiwfqdfg=="), /*请传入 wxpay_utility.EncryptOAEPWithPublicKey 加密结果*/
			IdCardNumber:         wxpay_utility.String("AOZdYGISxo4y44/UgZ69bdu9X+tfMUJ9dl+LetjM45/zMbrYu+wWZ8gn4CTdo+D/m9MrPg+V4sm73oxqdQu/hj7aWyDl4GQtPXVdaztB9jVbVZh3QFzV+BEmytMNQp9dt1uWJktlfdDdLR3AMWyMB377xd+m9bSr/ioDTzagEcGe+vLYiKrzcroQv3OR0p3ppFYoQ3IfYeU/04S4t9rNFL+kyblK2FCCqQ11NdbbHoCrJc7NV4oASq6ZFonjTtgjjgKsadIKHXtb3JZKGZjduGdtkRJJp0/0eow96uY1Pk7Rq79Jtt7+I8juwEc4P4TG5xzchG/5IL9DBd+Z0zZXkw=="), /*请传入 wxpay_utility.EncryptOAEPWithPublicKey 加密结果*/
			IdCardValidTimeBegin: wxpay_utility.String("2019-06-06"),
			IdCardValidTime:      wxpay_utility.String("2026-06-06"),
		},
		IdDocInfo: &IdDocInfo{
			IdDocName:      wxpay_utility.String("jTpGmxUX3FBWVQ5NJTZvlKX_gdU4cRz7z5NxpnFuAxhBTEO_PvWkfSCJ3zVIn001D8daLC-ehEuo0BJqRTvDujqhThn4ReFxikqJ5YW6zFQ"), /*请传入 wxpay_utility.EncryptOAEPWithPublicKey 加密结果*/
			IdDocNumber:    wxpay_utility.String("jTpGmxUX3FBWVQ5NJTZvlKX_gdU4cRz7z5NxpnFuAxhBTEO_PvWkfSCJ3zVIn001D8daLC-ehEuo0BJqRTvDujqhThn4ReFxikqJ5YW6zFQ"), /*请传入 wxpay_utility.EncryptOAEPWithPublicKey 加密结果*/
			IdDocCopy:      wxpay_utility.String("47ZC6GC-vnrbEny__Ie_An5-tCpqxucuxi-vByf3Gjm7KE53JXvGy9tqZm2XAUf-4KGprrKhpVBDIUv0OF4wFNIO4kqg05InE4d2I6_H7I4"),
			IdDocCopyBack:  wxpay_utility.String("47ZC6GC-vnrbEny__Ie_An5-tCpqxucuxi-vByf3Gjm7KE53JXvGy9tqZm2XAUf-4KGprrKhpVBDIUv0OF4wFNIO4kqg05InE4d2I6_H7I4"),
			DocPeriodBegin: wxpay_utility.String("2019-06-06"),
			DocPeriodEnd:   wxpay_utility.String("2020-01-02"),
		},
		Owner: wxpay_utility.Bool(true),
		AccountInfo: &AccountInfo{
			BankAccountType: wxpay_utility.String("75"),
			AccountBank:     wxpay_utility.String("工商银行"),
			AccountName:     wxpay_utility.String("AOZdYGISxo4y44/UgZ69bdu9X+tfMUJ9dl+LetjM45/zMbrYu+wWZ8gn4CTdo+D/m9MrPg+V4sm73oxqdQu/hj7aWyDl4GQtPXVdaztB9jVbVZh3QFzV+BEmytMNQp9dt1uWJktlfdDdLR3AMWyMB377xd+m9bSr/ioDTzagEcGe+vLYiKrzcroQv3OR0p3ppFYoQ3IfYeU/04S4t9rNFL+kyblK2FCCqQ11NdbbHoCrJc7NV4oASq6ZFonjTtgjjgKsadIKHXtb3JZKGZjduGdtkRJJp0/0eow96uY1Pk7Rq79Jtt7+I8juwEc4P4TG5xzchG/5IL9DBd+Z0zZXkw=="), /*请传入 wxpay_utility.EncryptOAEPWithPublicKey 加密结果*/
			BankAddressCode: wxpay_utility.String("110000"),
			BankBranchId:    wxpay_utility.String("402713354941"),
			BankName:        wxpay_utility.String("施秉县农村信用合作联社城关信用社"),
			AccountNumber:   wxpay_utility.String("d+xT+MQCvrLHUVDWv/8MR/dB7TkXM2YYZlokmXzFsWs35NXUot7C0NcxIrUF5FnxqCJHkNgKtxa6RxEYyba1+VBRLnqKG2fSy/Y5qDN08Ej9zHCwJjq52Wg1VG8MRugli9YMI1fI83KGBxhuXyemgS/hqFKsfYGiOkJqjTUpgY5VqjtL2N4l4z11T0ECB/aSyVXUysOFGLVfSrUxMPZy6jWWYGvT1+4P633f+R+ki1gT4WF/2KxZOYmli385ZgVhcR30mr4/G3HBcxi13zp7FnEeOsLlvBmI1PHN4C7Rsu3WL8sPndjXTd75kPkyjqnoMRrEEaYQE8ZRGYoeorwC+w=="), /*请传入 wxpay_utility.EncryptOAEPWithPublicKey 加密结果*/
		},
		ContactInfo: &ContactInfo{
			ContactType:                 wxpay_utility.String("65"),
			ContactName:                 wxpay_utility.String("pVd1HJ6zyvPedzGaV+X3qtmrq9bb9tPROvwia4ibL+F6mfjbzQIzfb3HHLEjZ4YiR/cJiCrZxnAqi+pjeKIEdkwzXRAI7FUhrfPK3SNjaBTEu9GmsugMIA9r3x887Q+ODuC8HH2nzAn7NGpE/e3yiHgWhk0ps5k5DP/2qIdGdONoDzZelrxCl/NWWNUyB93K9F+jC1JX2IMttdY+aQ6zBlw0xnOiNW6Hzy7UtC+xriudjD5APomty7/mYNxLMpRSvWKIjOv/69bDnuC4EL5Kz4jBHLiCyOb+tI0m2qhZ9evAM+Jv1z0NVa8MRtelw/wDa4SzfeespQO/0kjiwfqdfg=="), /*请传入 wxpay_utility.EncryptOAEPWithPublicKey 加密结果*/
			ContactIdDocType:            IDENTIFICATIONTYPE_IDENTIFICATION_TYPE_MACAO.Ptr(),
			ContactIdCardNumber:         wxpay_utility.String("pVd1HJ6zyvPedzGaV+X3qtmrq9bb9tPROvwia4ibL+F6mfjbzQIzfb3HHLEjZ4YiR/cJiCrZxnAqi+pjeKIEdkwzXRAI7FUhrfPK3SNjaBTEu9GmsugMIA9r3x887Q+ODuC8HH2nzAn7NGpE/e3yiHgWhk0ps5k5DP/2qIdGdONoDzZelrxCl/NWWNUyB93K9F+jC1JX2IMttdY+aQ6zBlw0xnOiNW6Hzy7UtC+xriudjD5APomty7/mYNxLMpRSvWKIjOv/69bDnuC4EL5Kz4jBHLiCyOb+tI0m2qhZ9evAM+Jv1z0NVa8MRtelw/wDa4SzfeespQO/0kjiwfqdfg=="), /*请传入 wxpay_utility.EncryptOAEPWithPublicKey 加密结果*/
			ContactIdDocCopy:            wxpay_utility.String("jTpGmxUX3FBWVQ5NJTZvvDujqhThn4ReFxikqJ5YW6zFQ"),
			ContactIdDocCopyBack:        wxpay_utility.String("jTpGmxUX3FBWVQ5NJTZvvDujqhThn4ReFxikqJ5YW6zFQ"),
			ContactIdDocPeriodBegin:     wxpay_utility.String("2019-06-06"),
			ContactIdDocPeriodEnd:       wxpay_utility.String("2026-06-06"),
			BusinessAuthorizationLetter: wxpay_utility.String("47ZC6GC-vnrbEny_Ie_An5-tCpqxucuxi-vByf3Gjm7KEIUv0OF4wFNIO4kqg05InE4d2I6_H7I4"),
			MobilePhone:                 wxpay_utility.String("pVd1HJ6zyvPedzGaV+X3qtmrq9bb9tPROvwia4ibL+F6mfjbzQIzfb3HHLEjZ4YiR/cJiCrZxnAqi+pjeKIEdkwzXRAI7FUhrfPK3SNjaBTEu9GmsugMIA9r3x887Q+ODuC8HH2nzAn7NGpE/e3yiHgWhk0ps5k5DP/2qIdGdONoDzZelrxCl/NWWNUyB93K9F+jC1JX2IMttdY+aQ6zBlw0xnOiNW6Hzy7UtC+xriudjD5APomty7/mYNxLMpRSvWKIjOv/69bDnuC4EL5Kz4jBHLiCyOb+tI0m2qhZ9evAM+Jv1z0NVa8MRtelw/wDa4SzfeespQO/0kjiwfqdfg=="), /*请传入 wxpay_utility.EncryptOAEPWithPublicKey 加密结果*/
		},
		SalesSceneInfo: &SalesSceneInfo{
			StoreName:           wxpay_utility.String("爱烧烤"),
			StoreUrl:            wxpay_utility.String("http://www.qq.com"),
			StoreQrCode:         wxpay_utility.String("jTpGmxUX3FBWVQ5NJTZvlKX_gdU4cRz7z5NxpnFuAxhBTEO_PvWkfSCJ3zVIn001D8daLC-ehEuo0BJqRTvDujqhThn4ReFxikqJ5YW6zFQ"),
			MiniProgramSubAppid: wxpay_utility.String("wxa123344545577"),
		},
		SettlementInfo: &SettlementInfo{
			SettlementId:      wxpay_utility.Int64(719),
			QualificationType: wxpay_utility.String("零售批发/生活娱乐/其他"),
		},
		MerchantShortname:    wxpay_utility.String("腾讯"),
		Qualifications:       wxpay_utility.String("[\"jTpGmxUX3FBWVQ5NJTZvlKX_gdU4cRz7z5NxpnFuAxhBTEO_PvWkfSCJ3zVIn001D8daLC-ehEuo0BJqRTvDujqhThn4ReFxikqJ5YW6zFQ\",\"47ZC6GC-vnrbEny__Ie_An5-tCpqxucuxi-vByf3Gjm7KE53JXvGy9tqZm2XAUf-4KGprrKhpVBDIUv0OF4wFNIO4kqg05InE4d2I6_H7I4\"]"),
		BusinessAdditionPics: wxpay_utility.String("[\"jTpGmxUX3FBWVQ5NJTZvlKX_gdU4cRz7z5NxpnFuAxhBTEO_PvWkfSCJ3zVIn001D8daLC-ehEuo0BJqRTvDujqhThn4ReFxikqJ5YW6zFQ\",\"47ZC6GC-vnrbEny__Ie_An5-tCpqxucuxi-vByf3Gjm7KE53JXvGy9tqZm2XAUf-4KGprrKhpVBDIUv0OF4wFNIO4kqg05InE4d2I6_H7I4\"]"),
		BusinessAdditionDesc: wxpay_utility.String("特殊情况，说明原因"),
		UboInfoList: []UboInfo{UboInfo{
			UboIdDocType:        IDENTIFICATIONTYPE_IDENTIFICATION_TYPE_MAINLAND_IDCARD.Ptr(),
			UboIdDocCopy:        wxpay_utility.String("jTpGmxUXqRTvDujqhThn4ReFxikqJ5YW6zFQ"),
			UboIdDocCopyBack:    wxpay_utility.String("jTpGmxUX3FBWVQ5NJTZvvDujqhThn4ReFxikqJ5YW6zFQ"),
			UboIdDocName:        wxpay_utility.String("AOZdYGISxo4y44/Ug4P4TG5xzchG/5IL9DBd+Z0zZXkw=="),                                                                                                                                                                                                                                                                                                           /*请传入 wxpay_utility.EncryptOAEPWithPublicKey 加密结果*/
			UboIdDocNumber:      wxpay_utility.String("AOZdYGISxo4y44/Ug4P4TG5xzchG/5IL9DBd+Z0zZXkw=="),                                                                                                                                                                                                                                                                                                           /*请传入 wxpay_utility.EncryptOAEPWithPublicKey 加密结果*/
			UboIdDocAddress:     wxpay_utility.String("pVd1HJ6zyvPedzGaV+X3qtmrq9bb9tPROvwia4ibL+F6mfjbzQIzfb3HHLEjZ4YiR/cJiCrZxnAqi+pjeKIEdkwzXRAI7FUhrfPK3SNjaBTEu9GmsugMIA9r3x887Q+ODuC8HH2nzAn7NGpE/e3yiHgWhk0ps5k5DP/2qIdGdONoDzZelrxCl/NWWNUyB93K9F+jC1JX2IMttdY+aQ6zBlw0xnOiNW6Hzy7UtC+xriudjD5APomty7/mYNxLMpRSvWKIjOv/69bDnuC4EL5Kz4jBHLiCyOb+tI0m2qhZ9evAM+Jv1z0NVa8MRtelw/wDa4SzfeespQO/0kjiwfqdfg=="), /*请传入 wxpay_utility.EncryptOAEPWithPublicKey 加密结果*/
			UboIdDocPeriodBegin: wxpay_utility.String("2019-06-06"),
			UboIdDocPeriodEnd:   wxpay_utility.String("2026-06-06"),
		}},
	}

	response, err := SubmitApplyment(config, request)
	if err != nil {
		fmt.Printf("请求失败: %+v\n", err)
		// TODO: 请求失败，根据状态码执行不同的处理
		return
	}

	// TODO: 请求成功，继续业务逻辑
	fmt.Printf("请求成功: %+v\n", response)
}

func SubmitApplyment(config *wxpay_utility.MchConfig, request *SubmitReq) (response *SubmitResp, err error) {
	const (
		host   = "https://api.mch.weixin.qq.com"
		method = "POST"
		path   = "/v3/ecommerce/applyments/"
	)

	reqUrl, err := url.Parse(fmt.Sprintf("%s%s", host, path))
	if err != nil {
		return nil, err
	}
	reqBody, err := json.Marshal(request)
	if err != nil {
		return nil, err
	}
	httpRequest, err := http.NewRequest(method, reqUrl.String(), bytes.NewReader(reqBody))
	if err != nil {
		return nil, err
	}
	httpRequest.Header.Set("Accept", "application/json")
	httpRequest.Header.Set("Wechatpay-Serial", config.WechatPayPublicKeyId())
	httpRequest.Header.Set("Content-Type", "application/json")
	authorization, err := wxpay_utility.BuildAuthorization(config.MchId(), config.CertificateSerialNo(), config.PrivateKey(), method, reqUrl.RequestURI(), reqBody)
	if err != nil {
		return nil, err
	}
	httpRequest.Header.Set("Authorization", authorization)

	client := &http.Client{}
	httpResponse, err := client.Do(httpRequest)
	if err != nil {
		return nil, err
	}
	respBody, err := wxpay_utility.ExtractResponseBody(httpResponse)
	if err != nil {
		return nil, err
	}
	if httpResponse.StatusCode >= 200 && httpResponse.StatusCode < 300 {
		// 2XX 成功，验证应答签名
		err = wxpay_utility.ValidateResponse(
			config.WechatPayPublicKeyId(),
			config.WechatPayPublicKey(),
			&httpResponse.Header,
			respBody,
		)
		if err != nil {
			return nil, err
		}
		response := &SubmitResp{}
		if err := json.Unmarshal(respBody, response); err != nil {
			return nil, err
		}

		return response, nil
	} else {
		return nil, wxpay_utility.NewApiException(
			httpResponse.StatusCode,
			httpResponse.Header,
			respBody,
		)
	}
}

type SubmitReq struct {
	OutRequestNo           *string                 `json:"out_request_no,omitempty"`
	OrganizationType       *string                 `json:"organization_type,omitempty"`
	FinanceInstitution     *bool                   `json:"finance_institution,omitempty"`
	BusinessLicenseInfo    *BusinessLicense        `json:"business_license_info,omitempty"`
	FinanceInstitutionInfo *FinanceInstitutionInfo `json:"finance_institution_info,omitempty"`
	IdHolderType           *IdHolderType           `json:"id_holder_type,omitempty"`
	IdDocType              *IdentificationType     `json:"id_doc_type,omitempty"`
	AuthorizeLetterCopy    *string                 `json:"authorize_letter_copy,omitempty"`
	IdCardInfo             *IdCardInfo             `json:"id_card_info,omitempty"`
	IdDocInfo              *IdDocInfo              `json:"id_doc_info,omitempty"`
	Owner                  *bool                   `json:"owner,omitempty"`
	AccountInfo            *AccountInfo            `json:"account_info,omitempty"`
	ContactInfo            *ContactInfo            `json:"contact_info,omitempty"`
	SalesSceneInfo         *SalesSceneInfo         `json:"sales_scene_info,omitempty"`
	SettlementInfo         *SettlementInfo         `json:"settlement_info,omitempty"`
	MerchantShortname      *string                 `json:"merchant_shortname,omitempty"`
	Qualifications         *string                 `json:"qualifications,omitempty"`
	BusinessAdditionPics   *string                 `json:"business_addition_pics,omitempty"`
	BusinessAdditionDesc   *string                 `json:"business_addition_desc,omitempty"`
	UboInfoList            []UboInfo               `json:"ubo_info_list,omitempty"`
}

type SubmitResp struct {
	ApplymentId  *int64  `json:"applyment_id,omitempty"`
	OutRequestNo *string `json:"out_request_no,omitempty"`
}

type BusinessLicense struct {
	CertType              *CertificateType `json:"cert_type,omitempty"`
	BusinessLicenseCopy   *string          `json:"business_license_copy,omitempty"`
	BusinessLicenseNumber *string          `json:"business_license_number,omitempty"`
	MerchantName          *string          `json:"merchant_name,omitempty"`
	LegalPerson           *string          `json:"legal_person,omitempty"`
	CompanyAddress        *string          `json:"company_address,omitempty"`
	BusinessTime          *string          `json:"business_time,omitempty"`
}

type FinanceInstitutionInfo struct {
	FinanceType        *FinanceType `json:"finance_type,omitempty"`
	FinanceLicensePics []string     `json:"finance_license_pics,omitempty"`
}

type IdHolderType string

func (e IdHolderType) Ptr() *IdHolderType {
	return &e
}

const (
	IDHOLDERTYPE_LEGAL IdHolderType = "LEGAL"
	IDHOLDERTYPE_SUPER IdHolderType = "SUPER"
)

type IdentificationType string

func (e IdentificationType) Ptr() *IdentificationType {
	return &e
}

const (
	IDENTIFICATIONTYPE_IDENTIFICATION_TYPE_MAINLAND_IDCARD         IdentificationType = "IDENTIFICATION_TYPE_MAINLAND_IDCARD"
	IDENTIFICATIONTYPE_IDENTIFICATION_TYPE_OVERSEA_PASSPORT        IdentificationType = "IDENTIFICATION_TYPE_OVERSEA_PASSPORT"
	IDENTIFICATIONTYPE_IDENTIFICATION_TYPE_HONGKONG                IdentificationType = "IDENTIFICATION_TYPE_HONGKONG"
	IDENTIFICATIONTYPE_IDENTIFICATION_TYPE_MACAO                   IdentificationType = "IDENTIFICATION_TYPE_MACAO"
	IDENTIFICATIONTYPE_IDENTIFICATION_TYPE_TAIWAN                  IdentificationType = "IDENTIFICATION_TYPE_TAIWAN"
	IDENTIFICATIONTYPE_IDENTIFICATION_TYPE_FOREIGN_RESIDENT        IdentificationType = "IDENTIFICATION_TYPE_FOREIGN_RESIDENT"
	IDENTIFICATIONTYPE_IDENTIFICATION_TYPE_HONGKONG_MACAO_RESIDENT IdentificationType = "IDENTIFICATION_TYPE_HONGKONG_MACAO_RESIDENT"
	IDENTIFICATIONTYPE_IDENTIFICATION_TYPE_TAIWAN_RESIDENT         IdentificationType = "IDENTIFICATION_TYPE_TAIWAN_RESIDENT"
)

type IdCardInfo struct {
	IdCardCopy           *string `json:"id_card_copy,omitempty"`
	IdCardNational       *string `json:"id_card_national,omitempty"`
	IdCardName           *string `json:"id_card_name,omitempty"`
	IdCardNumber         *string `json:"id_card_number,omitempty"`
	IdCardValidTimeBegin *string `json:"id_card_valid_time_begin,omitempty"`
	IdCardValidTime      *string `json:"id_card_valid_time,omitempty"`
}

type IdDocInfo struct {
	IdDocName      *string `json:"id_doc_name,omitempty"`
	IdDocNumber    *string `json:"id_doc_number,omitempty"`
	IdDocCopy      *string `json:"id_doc_copy,omitempty"`
	IdDocCopyBack  *string `json:"id_doc_copy_back,omitempty"`
	DocPeriodBegin *string `json:"doc_period_begin,omitempty"`
	DocPeriodEnd   *string `json:"doc_period_end,omitempty"`
}

type AccountInfo struct {
	BankAccountType *string `json:"bank_account_type,omitempty"`
	AccountBank     *string `json:"account_bank,omitempty"`
	AccountName     *string `json:"account_name,omitempty"`
	BankAddressCode *string `json:"bank_address_code,omitempty"`
	BankBranchId    *string `json:"bank_branch_id,omitempty"`
	BankName        *string `json:"bank_name,omitempty"`
	AccountNumber   *string `json:"account_number,omitempty"`
}

type ContactInfo struct {
	ContactType                 *string             `json:"contact_type,omitempty"`
	ContactName                 *string             `json:"contact_name,omitempty"`
	ContactIdDocType            *IdentificationType `json:"contact_id_doc_type,omitempty"`
	ContactIdCardNumber         *string             `json:"contact_id_card_number,omitempty"`
	ContactIdDocCopy            *string             `json:"contact_id_doc_copy,omitempty"`
	ContactIdDocCopyBack        *string             `json:"contact_id_doc_copy_back,omitempty"`
	ContactIdDocPeriodBegin     *string             `json:"contact_id_doc_period_begin,omitempty"`
	ContactIdDocPeriodEnd       *string             `json:"contact_id_doc_period_end,omitempty"`
	BusinessAuthorizationLetter *string             `json:"business_authorization_letter,omitempty"`
	MobilePhone                 *string             `json:"mobile_phone,omitempty"`
}

type SalesSceneInfo struct {
	StoreName           *string `json:"store_name,omitempty"`
	StoreUrl            *string `json:"store_url,omitempty"`
	StoreQrCode         *string `json:"store_qr_code,omitempty"`
	MiniProgramSubAppid *string `json:"mini_program_sub_appid,omitempty"`
}

type SettlementInfo struct {
	SettlementId      *int64  `json:"settlement_id,omitempty"`
	QualificationType *string `json:"qualification_type,omitempty"`
}

type UboInfo struct {
	UboIdDocType        *IdentificationType `json:"ubo_id_doc_type,omitempty"`
	UboIdDocCopy        *string             `json:"ubo_id_doc_copy,omitempty"`
	UboIdDocCopyBack    *string             `json:"ubo_id_doc_copy_back,omitempty"`
	UboIdDocName        *string             `json:"ubo_id_doc_name,omitempty"`
	UboIdDocNumber      *string             `json:"ubo_id_doc_number,omitempty"`
	UboIdDocAddress     *string             `json:"ubo_id_doc_address,omitempty"`
	UboIdDocPeriodBegin *string             `json:"ubo_id_doc_period_begin,omitempty"`
	UboIdDocPeriodEnd   *string             `json:"ubo_id_doc_period_end,omitempty"`
}

type CertificateType string

func (e CertificateType) Ptr() *CertificateType {
	return &e
}

const (
	CERTIFICATETYPE_CERTIFICATE_TYPE_2388 CertificateType = "CERTIFICATE_TYPE_2388"
	CERTIFICATETYPE_CERTIFICATE_TYPE_2389 CertificateType = "CERTIFICATE_TYPE_2389"
	CERTIFICATETYPE_CERTIFICATE_TYPE_2394 CertificateType = "CERTIFICATE_TYPE_2394"
	CERTIFICATETYPE_CERTIFICATE_TYPE_2395 CertificateType = "CERTIFICATE_TYPE_2395"
	CERTIFICATETYPE_CERTIFICATE_TYPE_2396 CertificateType = "CERTIFICATE_TYPE_2396"
	CERTIFICATETYPE_CERTIFICATE_TYPE_2399 CertificateType = "CERTIFICATE_TYPE_2399"
	CERTIFICATETYPE_CERTIFICATE_TYPE_2400 CertificateType = "CERTIFICATE_TYPE_2400"
	CERTIFICATETYPE_CERTIFICATE_TYPE_2520 CertificateType = "CERTIFICATE_TYPE_2520"
	CERTIFICATETYPE_CERTIFICATE_TYPE_2521 CertificateType = "CERTIFICATE_TYPE_2521"
	CERTIFICATETYPE_CERTIFICATE_TYPE_2522 CertificateType = "CERTIFICATE_TYPE_2522"
)

type FinanceType string

func (e FinanceType) Ptr() *FinanceType {
	return &e
}

const (
	FINANCETYPE_BANK_AGENT       FinanceType = "BANK_AGENT"
	FINANCETYPE_PAYMENT_AGENT    FinanceType = "PAYMENT_AGENT"
	FINANCETYPE_INSURANCE        FinanceType = "INSURANCE"
	FINANCETYPE_TRADE_AND_SETTLE FinanceType = "TRADE_AND_SETTLE"
	FINANCETYPE_OTHER            FinanceType = "OTHER"
)

```
