接口用于宝付账簿开户或账户升级上传资质文件使用。
接口须知
| 符号 | 符号性质 | 符号说明 |
|---|---|---|
| M | 强制域(Mandatory) | 必须填写的域 |
| C | 条件域(Conditional) | 某条件成立时必须填写的域 |
| O | 选用域(Optional) | 选填属性(可选预) |
| R | 原样返回域(Returned) | 必须与先前报文中对应域的值相同的域 |
报文头说明
请求报文
请求报文格式:key1=value1&key2=value2&key3=value3…
| 域名 | 类型 | 出现要求 | 参数备注 |
|---|---|---|---|
| orderType | String | M | 类型值:0 宝财通上传文件 |
| memberId | String | M | 宝付商户号 |
| terminalId | String | M | 宝付终端号 |
| verifyType | String | M | 固定值:11(RSA国际加密) |
| content | String | M | 内容 |
| file | Multipart | M | 上传的文件尽量文件名命名格式如下,上送的文件为ZIP压缩包。多个文件在fileNameMap中标识出来。与压缩包文件名一致。 |
| sha256 | String | M | 固定长度64位,对文件流进行sha256运算后转16进制 |
| signature | String | M | 除签名字段外全部加签。按key1=value1&key2=value2…模式将TreeMap对象转换为字符串,UTF-8编码格式下进行SHA-256计算后使用RSA私钥加签 |
示例:
memberId=102002345, terminalId=200002345, orderType=0, verifyType=11, content={“accType”:”2”,”transSerialNo”:”upload_20250915155515”,”businessParams”:”CM660000000122806438”,”noticeUrl”:”https://xxxx","fileNameMap":[{"fileName":"101","fileType":"101"},{"fileName":"102","fileType":"102"},{"fileName":"104","fileType":"104"},{"fileName":"111","fileType":"111"},{"fileName":"401","fileType":"401"},{"fileName":"999","fileType":"999"}]}, sha256=ca8307dac48160128a514d891d982a2e9b77adcde4c0154dfae3ec774bfd2833, signature=336A2D90D0FB889CCC03017F4EB9F2A3A6D48E2AB3649F8DEC89B20A17AAF59A5F3095F9C8F89805EA78693312F79B0B32418F0548D5C5E1317713EA6AFDA3005CF4A6C3CFB3A18862CC1E274D9A59EA5B0B6D05DA2389E5B709121D8AF857F2DC47DB7ED44B9467F881604CB6FD60F5D92C0C8ED93D364E3304C59D35405060
同步返回报文
| 域名 | 类型 | 出现要求 | 参数备注 |
|---|---|---|---|
| content | String | M | 内容 |
| signature | String | M | 除签名字段外全部加签。按key1=value1&key2=value2…模式将TreeMap对象转换为字符串,UTF-8编码格式下进行SHA-256计算后使用RSA私钥加签 |
示例:
memberId=102002345, terminalId=200002345, orderType=0, verifyType=11, content={“accType”:”2”,”transSerialNo”:”upload_20250915155515”,”businessParams”:”CM660000000122806438”,”noticeUrl”:”https://xxxx","fileNameMap":[{"fileName":"101","fileType":"101"},{"fileName":"102","fileType":"102"},{"fileName":"104","fileType":"104"},{"fileName":"111","fileType":"111"},{"fileName":"401","fileType":"401"},{"fileName":"999","fileType":"999"}]}, sha256=ca8307dac48160128a514d891d982a2e9b77adcde4c0154dfae3ec774bfd2833, signature=336A2D90D0FB889CCC03017F4EB9F2A3A6D48E2AB3649F8DEC89B20A17AAF59A5F3095F9C8F89805EA78693312F79B0B32418F0548D5C5E1317713EA6AFDA3005CF4A6C3CFB3A18862CC1E274D9A59EA5B0B6D05DA2389E5B709121D8AF857F2DC47DB7ED44B9467F881604CB6FD60F5D92C0C8ED93D364E3304C59D35405060
文件同步上传接口
接口URL
准生产环境地址:https://vgw.baofoo.com/baofu-upload-trade/trade/syncUploadFile
正式环境地址:https://upload.baofoo.com/baofu-upload-trade/trade/syncUploadFile
请求参数content
| 参数名称 | 类型 | 长度 | 出现要求 | 参数备注 |
|---|---|---|---|---|
| accType | int | 1 | M | 账户类型:1个人,2商户,3 个体工商户 |
| transSerialNo | String | 200 | M | 请求流水号 |
| businessParams | String | 128 | M | Ordertype 0 :自定义唯一标识,示例:登录号 |
| noticeUrl | String | 200 | O | 回调地址 |
| fileNameMap | List | 文件名映射表 | ||
| platformNo | String | 32 | C | 平台号(主商户号) (代理模式必传) |
fileNameMap(文件对应表 List)
| 参数名称 | 类型 | 长度 | 出现要求 | 参数备注 |
|---|---|---|---|---|
| fileType | String | 1 | M | 详情开户文件类型表 |
| fileName | String | 200 | M | 文件类型对应文件名称(不包括扩展名) |
返回参数content
| 参数名称 | 类型 | 长度 | 出现要求 | 参数备注 |
|---|---|---|---|---|
| success | int | 4 | M | 返回码 1 成功 0 失败 -1 异常 2处理中 |
| errorCode | String | 20 | C | 错误码 |
| errorMsg | String | 40 | C | 错误原因 |
| result | List | 返回数据列表 |
列表result
| 参数名称 | 类型 | 长度 | 出现要求 | 参数备注 |
|---|---|---|---|---|
| memberId | String | 32 | C | 宝付商户号 |
| terminalId | String | 32 | C | 宝付终端号 |
| businessParams | String | 100 | C | Ordertype 0 :自定义唯一标识,示例:登录号 |
| orderType | String | 200 | C | 订单类型 |
| transSerialNo | int | 1 | C | 请求流水号 |
| accType | int | 1 | C | 账户类型:1个人,2商户,3 个体工商户 |
| state | int | 1 | C | 订单状态1成功,2失败 |
| dfsFileNotifyList | List | 返回数据列表 |
列表dfsFileNotifyList
| 参数名称 | 类型 | 长度 | 出现要求 | 参数备注 |
|---|---|---|---|---|
| fileName | String | 64 | M | 文件名称 |
| fileType | String | 1 | M | 文件类型 |
| fileId | String | 64 | M | 文件ID |
| dfsGroup | String | 32 | M | Dfs分组 |
| dfsFileName | String | 64 | O | Dfs文件名 |
| dfsPath | String | 100 | M | Dfs路径 |
| state | int | 1 | O | 文件上传状态 |
文件查询接口
接口URL
准生产环境地址:https://qas-upload.baofoo.com/baofu-upload-trade/trade/queryUploadFile
正式环境地址:https://upload.baofoo.com/baofu-upload-trade/trade/queryUploadFile
请求参数content
| 参数名称 | 类型 | 长度 | 出现要求 | 参数备注 |
|---|---|---|---|---|
| version | String | 5 | M | 版本号:1.0.0 |
| transSerialNo | String | 200 | M | 请求流水号 |
| businessParams | String | 128 | M | Ordertype 0 :自定义唯一标识,示例:登录号 |
| platformNo | String | 32 | C | 平台号(主商户号) (代理模式必传) |
| tradeTime | String | 10 | M | 对应流水号的交易日期,格式YYYY-MM-DD |
返回参数content
| 参数名称 | 类型 | 长度 | 出现要求 | 参数备注 |
|---|---|---|---|---|
| success | int | 4 | M | 返回码 1 成功 0 失败 -1 异常 2处理中 |
| errorCode | String | 20 | C | 错误码 |
| errorMsg | String | 40 | C | 错误原因 |
| result | List | 返回数据列表 |
列表result
| 参数名称 | 类型 | 长度 | 出现要求 | 参数备注 |
|---|---|---|---|---|
| memberId | String | 32 | C | 宝付商户号 |
| terminalId | String | 32 | C | 宝付终端号 |
| businessParams | String | 100 | C | Ordertype 0 :自定义唯一标识,示例:登录号 |
| orderType | String | 200 | C | 订单类型 |
| transSerialNo | int | 1 | C | 请求流水号 |
| accType | int | 1 | C | 账户类型:1个人,2商户,3 个体工商户 |
| state | int | 1 | C | 订单状态1成功,2失败 |
| sync | int | 1 | C | 同步状态0异步 1同步 |
| dfsFileNotifyList | List | 返回数据列表 |
列表dfsFileNotifyList
| 参数名称 | 类型 | 长度 | 出现要求 | 参数备注 |
|---|---|---|---|---|
| fileName | String | 64 | M | 文件名称 |
| fileType | String | 1 | M | 文件类型 |
| fileId | String | 64 | M | 文件ID |
| dfsGroup | String | 32 | M | Dfs分组 |
| dfsFileName | String | 64 | O | Dfs文件名 |
| dfsPath | String | 100 | M | Dfs路径 |
| state | int | 1 | O | 文件重传/上传状态 |
文件重新上传接口
接口URL
准生产环境地址:https://qas-upload.baofoo.com/baofu-upload-trade/trade/syncReUploadFile
正式环境地址:https://upload.baofoo.com/baofu-upload-trade/trade/syncReUploadFile
请求参数content
| 参数名称 | 类型 | 长度 | 出现要求 | 参数备注 |
|---|---|---|---|---|
| accType | int | 1 | M | 账户类型:1个人,2商户,3 个体工商户 |
| transSerialNo | String | 200 | M | 请求流水号 |
| businessParams | String | 128 | M | Ordertype 0 :开户返回的客户账户号 |
| noticeUrl | String | 200 | O | 回调地址 |
| fileNameMap | List | 文件名映射表 |
fileNameMap(文件对应表 List)
| 参数名称 | 类型 | 长度 | 出现要求 | 参数备注 |
|---|---|---|---|---|
| fileType | String | 1 | M | 详情开户文件类型表 |
| fileName | String | 200 | M | 文件类型对应文件名称(不包括扩展名) |
返回参数content
| 参数名称 | 类型 | 长度 | 出现要求 | 参数备注 |
|---|---|---|---|---|
| success | int | 4 | M | 返回码 1 成功 0 失败 -1 异常 2处理中 |
| errorCode | String | 20 | C | 错误码 |
| errorMsg | String | 40 | C | 错误原因 |
| result | List | 返回数据列表 |
列表result
| 参数名称 | 类型 | 长度 | 出现要求 | 参数备注 |
|---|---|---|---|---|
| memberId | String | 32 | C | 宝付商户号 |
| terminalId | String | 32 | C | 宝付终端号 |
| businessParams | String | 100 | C | Ordertype 0 :自定义唯一标识,示例:登录号 |
| orderType | String | 200 | C | 订单类型 |
| transSerialNo | int | 1 | C | 请求流水号 |
| accType | int | 1 | C | 账户类型:1个人,2商户,3 个体工商户 |
| dfsFileNotifyList | List | 返回数据列表 |
列表dfsFileNotifyList
| 参数名称 | 类型 | 长度 | 出现要求 | 参数备注 |
|---|---|---|---|---|
| fileName | String | 64 | M | 文件名称 |
| fileType | String | 1 | M | 文件类型 |
| fileId | String | 64 | M | 文件ID |
| dfsGroup | String | 32 | M | Dfs分组 |
| dfsFileName | String | 64 | O | Dfs文件名 |
| dfsPath | String | 100 | M | Dfs路径 |
| state | int | 1 | O | 文件上传状态 |
文件完成结果通知
1.宝付返回格式为JSON
2.商户接收到通知后务必在接收通知页面上返回大写OK
3.宝付系统在未确认商户接收通知成功后将会通过重发机制通知商户(重发次数10次,请以第一次收到的付款成功的消息为准,避免进行多次确认)通知发给商户。
4.该接口除了订单成功、失败结果通知外,退款的结果也一并通知。
5.商户若需要该回调接口需联系技术支持人员配置回调地址等相关信息。
6.通知接口Demo http://URL? member_id=1 & terminal_id=2 & data_type=JSON & data_content=内容 &signature=签名
报文头说明
| 参数名称 | 类型 | 出现要求 | 参数备注 |
|---|---|---|---|
| memberId | String | M | 宝付商户号 |
| terminalId | String | M | 宝付终端号 |
| data_type | String | M | JSON |
| data_content | String | M | |
| signature | String | M | 除签名字段外全部加签。按key1=value1&key2=value2…模式将TreeMap对象转换为字符串,UTF-8编码格式下进行SHA-256计算后使用RSA私钥加签 |
报文参数data_content
| 参数名称 | 类型 | 长度 | 出现要求 | 参数备注 |
|---|---|---|---|---|
| memberId | String | 32 | C | 宝付商户号 |
| terminalId | String | 32 | C | 宝付终端号 |
| businessParams | String | 100 | C | Ordertype 0 :自定义唯一标识,示例:登录号 |
| orderType | String | 200 | C | 订单类型 |
| transSerialNo | int | 1 | C | 请求流水号 |
| accType | int | 1 | C | 账户类型:1个人,2商户,3 个体工商户 |
| state | int | 1 | C | 订单状态1成功,2失败 |
| dfsFileNotifyList | List | 返回数据列表 |
列表dfsFileNotifyList
| 参数名称 | 类型 | 长度 | 出现要求 | 参数备注 |
|---|---|---|---|---|
| fileName | String | 64 | M | 文件名称 |
| fileType | String | 1 | M | 文件类型 |
| fileId | String | 64 | M | 文件ID |
| dfsGroup | String | 32 | M | Dfs分组 |
| dfsFileName | String | 64 | O | Dfs文件名 |
| dfsPath | String | 100 | M | Dfs路径 |
| state | int | 1 | O | 文件上传/重传状态 |
| path | String | 100 | O | 文件路径 |
通知报文说明
格式样例:
{“accType”:”1”,”businessParams”:”CP660000002185089108”,”dfsFileNotifyList”:[{“dfsFileName”:”CertIdBack”,”dfsGroup”:”group1”,”dfsPath”:”M00/3C/BD/CgAVhF7WDICAbooPABlMAzW0aS0255.jpg”,”fileId”:12979198,”fileName”:”CertIdBack”,”fileType”:302},{“dfsFileName”:”CertIdFront”,”dfsGroup”:”group1”,”dfsPath”:”M00/40/C1/CgAVg17WDICAc_ysABlMAzW0aS0815.jpg”,”fileId”:12979199,”fileName”:”CertIdFront”,”fileType”:301},{“dfsFileName”:”PlatformCooperateAgreement”,”dfsGroup”:”group1”,”dfsPath”:”M00/3C/BD/CgAVhF7WDIGAVO2vABlMAzW0aS0426.jpg”,”fileId”:12979200,”fileName”:”PlatformCooperateAgreement”,”fileType”:311},{“dfsFileName”:”SpecialIndustryLicense”,”dfsGroup”:”group1”,”dfsPath”:”M00/40/C1/CgAVg17WDIGAPS1RABlMAzW0aS0072.jpg”,”fileId”:12979201,”fileName”:”SpecialIndustryLicense”,”fileType”:999},{“dfsFileName”:”BankCard”,”dfsGroup”:”group1”,”dfsPath”:”M00/3C/BD/CgAVhF7WDIGAMiIaABlMAzW0aS0679.jpg”,”fileId”:12979202,”fileName”:”BankCard”,”fileType”:401}],”memberId”:100000178,”orderType”:0,”state”:1,”terminalId”:100000859,”transSerialNo”:”UPFILE1591086203360”}
响应报文说明
注意:接受请求之后,请必须按照要求返回”OK”。
附录
开户文件类型表(jpg或png结尾):
| 二级商户类型 | 附件名 | 类型ID |
|---|---|---|
| 公司 | 企业营业执照 | 101 |
| 公司 | 开户许可证(或开户凭证) | 102 |
| 公司 | 法人身份证正面 | 104 |
| 公司 | 法人身份证反面 | 111 |
| 公司 | 与平台合作协议 | 401 |
| 公司 | 特殊行业许可证(酒店/旅馆) | 999 |
| 个体工商户 | 个体工商户营业执照 | 101 |
| 个体工商户 | 开户许可证/经营者本人银行卡正面照 | 102 |
| 个体工商户 | 经营者身份证正面 | 104 |
| 个体工商户 | 经营者身份证反面 | 111 |
| 个体工商户 | 与平台合作协议 | 401 |
| 个体工商户 | 特殊行业许可证(酒店/旅馆) | 999 |
| 自然人 | 个人身份证正面 | 301 |
| 自然人 | 个人身份证反面 | 302 |
| 自然人 | 本人名下状态正常银行卡 | 311 |
| 自然人 | 与平台合作协议 | 401 |
| 自然人 | 特殊行业资格证书 | 999 |
文件参考命名格式(zip结尾): 压缩包文件名不强制规定
| 二级商户类型 | 格式 | 示例 |
|---|---|---|
| 公司 | 平台商户号_二级商户户名 | 120838_zhangsan@163.com |
| 个体工商户 | 平台商户号_二级商户户名 | 120838_zhangsan@163.com |
| 自然人 | 平台商户号_手机号 | 120838_13999990001 |
最后编辑:庞寅 更新时间:2025-12-08 19:39