创建收单订单
POST/payment/createPaymentOrder
商户发起收单订单,并收到支付页面的链接,用户跳转并支付后,系统会向商户提供的回调地址发送支付结果通知。
信息
此接口返回的支付页面链接 paymentUrl
,需要加上 Pay Protocol 的域名才能访问。
- 正式环境:"https://payment.payprotocol.network" + paymentUrl
- 沙盒环境:"https://payment-sandbox.payprotocol.network" + paymentUrl
Request
- application/json
Body
0
- 否1
- 是
chainId int32required
链 ID
此为平台内部 ID,不是链上或者钱包里的链 ID,可以从查询链列表接口获取
description stringrequired
订单描述
outTradeNo stringrequired
商户订单号
isLegalTender integerrequired
Possible values: [0
, 1
]
报价币种是否为法币
quoteCurrencySymbol stringrequired
报价币种符号,必须为大写字母
注:报价币种为法币时,该字段为国际标准法币符号,如 USD、CNY,否则为数字货币符号,如 USDT、TRX、ETH
quoteAmount stringrequired
报价金额
注:是实际金额,必须为正数,可为小数
notifyUrl urirequired
商户回调地址
必须为公网可访问的 HTTPS 协议地址,否则无法接收到回调通知
redirectionUrl uri
用户支付成功后的跳转地址
Responses
- 200
- 201
- 401
- 403
- 404
OK
- application/json
- Schema
- Example (from schema)
- Example
Schema
code int32required
状态码
msg stringrequired
成功或错误提示
description string
错误提示详情
data
object
required
outPaymentNo stringrequired
支付单号
paymentUrl stringrequired
支付页面的链接
userWalletAddress stringrequired
用于收款的子合约账户地址
saltHash stringrequired
用于验证子合约账户的盐值哈希
{
"code": 0,
"msg": "string",
"description": "string",
"data": {
"outPaymentNo": "string",
"paymentUrl": "string",
"userWalletAddress": "string",
"saltHash": "string"
}
}
{
"code": 200,
"msg": "success",
"data": {
"outPaymentNo": "202312181035353064079",
"paymentUrl": "/payment?apiSign=na%2FcPNFSRrx4izPwaAemCibbJLUCGP64B5mJ60upO1Q%3D",
"saltHash": "0x657faff79490a0c7a7d798d23d6b119e5eacc8f850f99a44e32b0a6cf9da6b11",
"userWalletAddress": "TBqJ84AKTezZnzRN5nJs1k3yD2LUbQa23K"
}
}
Created
Unauthorized
Forbidden
Not Found
Loading...