发起进件
开发环境
http://dev-cn.your-api-server.com
开发环境
http://dev-cn.your-api-server.com
POST
https://open.douyin.com/api/apps/ecpay/v3/saas/create_merchant/
接口说明
提交商户资料,开通商户号以收款或接收分账。
如果进件接口没有返回 merchant_id,请使用原参数重新进件。
图片信息参数
名称 | 类型 | 是否必填 | 最大 长度 | 描述 | 示例值 |
---|---|---|---|---|---|
channel | string | 是 | 20 | 图片对应的进件渠道枚举,详见请求参数channels | hz |
url | string | 是 | 256 | 图片id信息,通过图片上传接口获取 | 2.jpeg |
错误码
错误码 err_code | 描述 err_tips | 排查建议 |
---|---|---|
0 | 受理成功 | 受理成功 |
1000 | 内部错误 | 系统异常,请使用相同参数稍后重试 |
1004 | 未知异常 | 请原参数重试 |
1005 | 频率控制 | 请降低调用频率 |
1007 | 参数错误:channels参数不合法,请检查 | channels传参说明: 开通支付宝和抖音支付:[ "alipay" , "hz"] 开通支付宝、抖音支付、微信:[ "wx" , "alipay" , "hz"] |
2008 | token校验异常,请校验请求头中生成token的小程序appid/服务商id和请求参数是否一致 | 请校验请求头中生成token的小程序appid/服务商id和请求参数是否一致 |
2010 | 参数错误: 参数MerchantType不正确 | 请使用正确的参数重新调用 |
参数错误: 进件渠道为空 | ||
参数错误: 未知类型(Invalid Type) | ||
参数错误:maAppID或者sub_merchant_id为空 | ||
参数错误:thirdPartyID为空 | ||
参数错误:thirdPartyID或maAppID或sub_merchant_id为空 | ||
参数错误:thirdPartyID或sub_merchant_id为空 | ||
参数错误: 参数:MerchantName 为空 | ||
参数错误: 参数:MerchantShortName 为空 | ||
参数错误: 没有合众营业执照 | ||
参数错误: 没有微信营业执照 | ||
参数错误: 没有支付宝营业执照 | ||
参数错误: 营业执照有效期起止时间错误 | ||
参数错误: 进件微信、合众或者进件支付 宝且支付宝结算类型为银行卡时,开户银行不可为空 | ||
参数错误: 参数:店铺名称 为空 | ||
参数错误: 参数:店铺链接 为空 | ||
参数错误: 参数:签约的支付宝账户 为空 | ||
参数错误: 参数:OutOrderId 为空 | ||
参数错误:当管理员类型为法人时,管理员姓名和身份证号需要和法人的姓名和身份证号一致 | ||
7001 | 存在流程进行中的申请单或者已经进件成功 | 可通过查询申请单状态查看此申请单的申请状态 |
7002 | 申请单不存在 | 确认入参,传入正确的申请单编号 |
7003 | 商户重复入驻 | 商户更换文件后,重新调用 |
7025 | 当前小程序所归属的服务类目,暂不支持开通支付功能 | 详情请查看小程序交易能力接入规范 |
28001008 | access_token过期,请刷新或重新授权 | access_token过期,请根据请求头中token获取方式调用接口重新获取 |
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://open.douyin.com/api/apps/ecpay/v3/saas/create_merchant/' \
--header 'access-token;' \
--header 'Content-Type: application/json' \
--data-raw '{
"app_id": "ttappid1231231",
"thirdparty_id": "",
"sub_merchant_id": "ttsubmerchantid1231",
"type": 1,
"callback_url": "",
"channels": [
"hz",
"alipay",
"wx"
],
"merchant_type": 2,
"merchant_name": "测试商户名称",
"merchant_short_name": "测试",
"province_code": "110000",
"city_code": "110100",
"district_code": "110105",
"registered_addr": "京市海淀区xxxx",
"business_license": {
"business_license_type": 3,
"business_license_code": "1231123112",
"business_license_picurl": [
{
"channel": "hz",
"url": "asdasda1212.jepg"
},
{
"channel": "wx",
"url": "tos-cn-i-01omznotxb/asdasda"
},
{
"channel": "alipay",
"url": "tos-cn-i-01omznotxb/asdaasd"
}
],
"begin_date": "20210917",
"end_date": "20510916"
},
"legal_person": {
"id_type": 1,
"id_no": "123121",
"name": "测试",
"front_pic_url": [
{
"channel": "hz",
"url": "tos-cn-i-01omznotxb/12312"
},
{
"channel": "wx",
"url": "tos-cn-i-01omznotxb/1231"
},
{
"channel": "alipay",
"url": "tos-cn-i-01omznotxb/1231"
}
],
"back_pic_url": [
{
"channel": "hz",
"url": "tos-cn-i-01omznotxb/1231"
},
{
"channel": "wx",
"url": "tos-cn-i-01omznotxb/1231"
},
{
"channel": "alipay",
"url": "tos-cn-i-01omznotxb/1231"
}
],
"begin_date": "20220201",
"exp_date": "20400527",
"address": "122344"
},
"merchant_card_info": {
"account_name": "测试accountname",
"account_no": "123211",
"bank_full_name": "测试银行",
"settle_type": 2,
"card_type": "DC",
"alipay_settle_type": 1,
"alipay_account_no": ""
},
"merchant_operation_info": {
"manage_name": "测试",
"manage_mobile": "183xxxx1211",
"manage_person_type": 1,
"manage_id_no": "12312231231",
"manage_email": "ceshi@qq.com",
"shop_name": "测试小店",
"shop_url": "https://microapp.bytedance.com",
"id_type": 0,
"id_begin_date": "",
"id_exp_date": "",
"id_front_pic_url": "",
"id_back_pic_url": "",
"business_authorization_letter": "",
"alipay_account_no": "123112"
},
"industry_code": [
"7011"
],
"out_order_id": "123121131",
"create_name": "12312312312312",
"beneficiary_type": "LEGAL"
}'
响应示例响应示例
200 - 示例 1
{
"err_no": 0,
"err_msg": "string",
"log_id": "string",
"data": {
"apply_id": "string",
"merchant_id": "string"
}
}
请求参数
Header 参数
Content-Type
string
必需
access-token
string
必需
Body 参数application/json