汇分账
  1. 接口列表
汇分账
  • 安全发
    • 产品介绍
    • 接口签名
    • 接口列表
      • 支付结果回调说明
      • 查询明细
      • 查询批量转账结果
      • 获取回单下载地址
      • 查询签约账户信息
      • 查询转账记录
      • 下发转账任务
  • 支付相关接口
    • 子商户提现查询
      POST
    • 子商户提现
      POST
  • 分账业务接口
    • 产品介绍
    • 对接流程
  • 快捷支付接口
    • 对接流程
    • 接口列表
      • 支付授权接口(接口401,先看这个)
        POST
      • 协议支付确认交易
        POST
      • 协议支付预交易
        POST
      • 协议支付绑卡预交易
        POST
      • 协议支付前台绑卡
        POST
      • 协议支付解绑
        POST
      • 协议支付绑卡确认
        POST
      • 支付结果查询
        POST
  • 云闪付接口
    • 产品介绍
    • 接口列表
      • 云闪付 APP 支付
      • 支付授权接口(接口401,先看这个)
      • 主扫支付(云闪付)
  • 外卡支付开发接口
    • 国际公认的国家和地区ISO 3166-1代码表
    • 接口协议约定
    • 外卡退款查询
      POST
    • 创建外卡订单
      POST
    • 查询外卡订单
      POST
    • 外卡订单退款
      POST
  • 网银支付
    • 产品介绍
    • 接入流程
  • 数字人民币
    • 产品介绍
    • 对接流程
  • 资金归集
    • 产品介绍
    • 对接流程
  • 互联网直付通
    • 产品介绍
    • 接口列表
  • 汇分账web3钱包
    • 产品介绍
    • 对接流程
  1. 接口列表

协议支付预交易

POST
/pay/protocolPayPre
支付相关接口
协议支付预交易

请求参数

Body 参数application/json
协议支付请求
version
string 
版本号
可选
outTradeNo
string 
商户订单号
必需
customerCode
string 
商户编号
必需
memberId
string 
会员编号
可选
protocol
string 
协议号
可选
payAmount
integer <int64>
必需
payCurrency
string 
必需
支付币种 CNY:人民币
notifyUrl
string 
异步通知地址
可选
orderInfo
object (OrderInfo) 
必需
id
string 
商品订单编号
必需
businessType
string 
业务种类
必需
商品订单业务种类编码 见附录
goodsList
array[object (OrderGoods) {3}] 
订单商品列表
可选
attachData
string 
附加信息
可选
transactionStartTime
string 
交易开始时间
必需
商户系统发起交易的时间,格式:
YYYYMMDDHHMMSS
transactionEndTime
string 
交易超时时间
可选
该笔交易允许的最晚付款时间,逾期将
关闭交易。格式:
YYYYMMDDHHMMSS;默认:
transactionStartTime+30 分钟,最
大:transactionStartTime+24 小时
needSplit
boolean 
可选
splitInfoList
array[object (SplitInfo) {3}] 
分账信息列表
可选
customerCode
string 
可选
amount
integer <int64>
可选
isProcedureCustomer
integer <int32>
可选
splitNotifyUrl
string 
可选
分账结果异步通知URL
splitAttachData
string 
可选
分账的通知和查询接口中原样返回
nonceStr
string 
随机字符串
必需
随机字符串,推荐随机数生成算法产生
smsNo
string 
绑卡流水号
可选
smsCode
string 
短息验证码
可选
transType
string 
交易类别
可选
值可填“01 快捷支付、02 代收”。
不填时默认 01 快捷支付
commissionedCustomerCode
string 
委托方客户编号
可选
isOpen
string 
是否已开通交易
可选
uploadMerchantNo
string 
上送子商户号
可选
isSendSmsCode
string 
可选
示例
{
    "version": "string",
    "outTradeNo": "string",
    "customerCode": "string",
    "memberId": "string",
    "protocol": "string",
    "payAmount": 0,
    "payCurrency": "string",
    "notifyUrl": "string",
    "orderInfo": {
        "id": "string",
        "businessType": "string",
        "goodsList": [
            {
                "name": "string",
                "number": "string",
                "amount": 0
            }
        ]
    },
    "attachData": "string",
    "transactionStartTime": "string",
    "transactionEndTime": "string",
    "needSplit": true,
    "splitInfoList": [
        {
            "customerCode": "string",
            "amount": 0,
            "isProcedureCustomer": 0
        }
    ],
    "splitNotifyUrl": "string",
    "splitAttachData": "string",
    "nonceStr": "string",
    "smsNo": "string",
    "smsCode": "string",
    "transType": "string",
    "commissionedCustomerCode": "string",
    "isOpen": "string",
    "uploadMerchantNo": "string",
    "isSendSmsCode": "string"
}

示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST '/pay/protocolPayPre' \
--header 'Content-Type: application/json' \
--data-raw '{
    "version": "string",
    "outTradeNo": "string",
    "customerCode": "string",
    "memberId": "string",
    "protocol": "string",
    "payAmount": 0,
    "payCurrency": "string",
    "notifyUrl": "string",
    "orderInfo": {
        "id": "string",
        "businessType": "string",
        "goodsList": [
            {
                "name": "string",
                "number": "string",
                "amount": 0
            }
        ]
    },
    "attachData": "string",
    "transactionStartTime": "string",
    "transactionEndTime": "string",
    "needSplit": true,
    "splitInfoList": [
        {
            "customerCode": "string",
            "amount": 0,
            "isProcedureCustomer": 0
        }
    ],
    "splitNotifyUrl": "string",
    "splitAttachData": "string",
    "nonceStr": "string",
    "smsNo": "string",
    "smsCode": "string",
    "transType": "string",
    "commissionedCustomerCode": "string",
    "isOpen": "string",
    "uploadMerchantNo": "string",
    "isSendSmsCode": "string"
}'

返回响应

🟢200成功
*/*
OK
Body
响应信息主体
code
integer <int32>
可选
msg
string 
可选
data
object (ProtocolPayResponse) 
协议支付返回
可选
returnCode
string 
必需
返回状态码; 0000:处理成功;0000:处理成功
returnMsg
string 
信息
可选
customerCode
string 
客户编码
必需
memberId
string 
会员编号
可选
outTradeNo
string 
商户交易订单号
必需
transactionNo
string 
易票联交易订单号
可选
payResult
string 
支付结果
可选
payAmount
string 
订单金额
可选
token
string 
唯一代表该订单
可选
nonceStr
string 
必需
protocol
string 
协议号
必需
示例
{
    "code": 0,
    "msg": "string",
    "data": {
        "returnCode": "string",
        "returnMsg": "string",
        "customerCode": "string",
        "memberId": "string",
        "outTradeNo": "string",
        "transactionNo": "string",
        "payResult": "string",
        "payAmount": "string",
        "token": "string",
        "nonceStr": "string",
        "protocol": "string"
    }
}
上一页
协议支付确认交易
下一页
协议支付绑卡预交易
Built with