主题
卖单接口(商户提现)
POST
/merchant/createOrder
商户提现人民币,通过支付渠道系统处理。根据选择的支付渠道不同,可能需要额外的账户信息。
请求参数(基础参数)
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
order_type | int | 是 | 订单类型,卖单固定为 2 |
cny_amount | decimal | 是 | 提现的人民币金额,必须大于 0 |
paychannel_id | int | 是 | 支付渠道 ID |
paychannel_paymethod | string | 是 | 支付方式(wxpay/alipay/bank) |
汇付天下渠道
如果 paychannel_id 对应的支付渠道分类为汇付天下(category = 'huifu'),则必须提供以下汇付账户参数。
汇付天下账户参数(条件必填)
当 paychannel_id 对应的支付渠道分类为汇付天下(category = 'huifu')时,以下参数为必填。
huifu_personal_data 对象
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
name | string | 是 | 真实姓名 |
cert_type | string | 是 | 证件类型,00=身份证 |
cert_no | string | 是 | 证件号码 |
cert_validity_type | string | 是 | 证件有效期类型,1=长期有效,0=非长期有效 |
cert_begin_date | string | 是 | 证件有效期开始日期,格式 YYYYMMDD |
cert_end_date | string | 条件必填 | 证件有效期截止日期,格式 YYYYMMDD(当 cert_validity_type=0 时必填) |
mobile_no | string | 是 | 手机号 |
email | string | 否 | 电子邮箱 |
address | string | 否 | 地址 |
huifu_card_info 对象
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
card_type | string | 是 | 卡类型,0=对公,1=对私法人,2=对私非法人,4=对公非同名 |
card_name | string | 是 | 持卡人姓名 |
card_no | string | 是 | 银行卡号 |
prov_id | string | 是 | 省份 ID |
area_id | string | 是 | 地区 ID |
结算卡证件信息
结算卡信息中的证件信息(cert_type、cert_no、cert_validity_type、cert_begin_date、cert_end_date)无需填写,系统将自动从个人基本信息(huifu_personal_data)中复用。若 cert_validity_type 为非长期有效(0),请确保 huifu_personal_data 中已填写 cert_end_date。
请求示例(普通渠道)
json
{
"api_key": "your_api_key",
"timestamp": 1699065600,
"nonce": "abc123def456",
"signature": "generated_signature_here",
"order_type": 2,
"cny_amount": 1000.00,
"paychannel_id": 2,
"paychannel_paymethod": "alipay"
}请求示例(汇付天下渠道)
json
{
"api_key": "your_api_key",
"timestamp": 1699065600,
"nonce": "abc123def456",
"signature": "generated_signature_here",
"order_type": 2,
"cny_amount": 1000.00,
"paychannel_id": 1,
"paychannel_paymethod": "bank",
"huifu_personal_data": {
"name": "张三",
"cert_type": "00",
"cert_no": "412724199808295816",
"cert_validity_type": "1",
"cert_begin_date": "20200101",
"cert_end_date": "",
"mobile_no": "15622807759",
"email": "zhangsan@example.com",
"address": "上海市浦东新区张江高科技园区"
},
"huifu_card_info": {
"card_type": "1",
"card_name": "张三",
"card_no": "6217001234567890",
"prov_id": "110000",
"area_id": "110100"
}
}响应参数
| 参数名 | 类型 | 说明 |
|---|---|---|
order_id | string | 订单 ID |
order_no | string | 订单编号 |
status | string | 订单状态(pending=待处理) |
order_type | int | 订单类型(2=卖出) |
cny_amount | string | 人民币金额 |
payment_method_id | int | 支付方式 ID |
payment_method_snapshot | object | 支付方式快照(创建时的支付方式信息) |
merchant_amount | string | 商户提现的人民币数量 |
passage_rate | string | 通道费率 |
passage_amount | int | 通道金额 |
deposit_rate | int | 保证金费率 |
deposit_amount | int | 保证金金额 |
service_amount | int | 服务费金额 |
channel_amount | int | 渠道佣金 |
merchant_actual_amount | int | 商户实际扣款人民币数量(含手续费) |
base_rate | int | 基础费率 |
customer_payment_method | object | 客户收款方式信息 |
createtime | int | 创建时间戳 |
响应示例
json
{
"code": 1,
"msg": "订单创建成功",
"time": "1768915894",
"data": {
"order_id": "36",
"order_no": "ORD202601202131346386",
"status": "pending",
"order_type": 2,
"cny_amount": "73000",
"payment_method_id": 0,
"payment_method_snapshot": {
"bank": "测试银行1",
"sub_bank": "测试支行1",
"card_number": "1234567890123",
"real_name": "张三"
},
"merchant_amount": "73000",
"passage_rate": "-0.10000000",
"passage_amount": "73000",
"deposit_rate": 0,
"deposit_amount": 0,
"service_amount": 1463,
"channel_amount": 0,
"merchant_actual_amount": 74463,
"base_rate": 0,
"createtime": 1768915894,
"customer_payment_method": {
"bank": "测试银行1",
"sub_bank": "测试支行1",
"card_number": "1234567890123",
"real_name": "张三",
"full_info": "测试银行1 - 张三 (0123)"
}
}
}