支付
创建支付订单并获取收银台链接
创建支付订单,并返回支持渠道(WEB、H5、APP)的收银台 URL / 深链。 响应包含跳转链接及可用支付方式列表。请引导付款人打开返回的 URL 完成支付。
仅 PSP 商户可在请求中传可选字段 subMerchantCode,用于标记子商户业务编码。
非 PSP 商户若传入非空 subMerchantCode 将被拒绝(subMerchantNotAllowed)。
留空或省略对所有商户均允许。
沙箱提示
创单成功后仍需在沙箱收银台完成支付。见 在沙箱环境中测试支付。
标头参数
X-R-Ts*string
请求时间戳(毫秒)
X-R-Ak*string
商户 appKey
X-R-Signature*string
请求签名
X-R-Key-Version?string
商户私钥版本,默认 1
请求主体
application/json
TypeScript 定义
在 TypeScript 中使用 request body 类型。
创建支付请求
响应主体
*/*
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/openapi/v2/order/create" \ -H "X-R-Ts: 1762327084929" \ -H "X-R-Ak: string" \ -H "X-R-Signature: string" \ -H "Content-Type: application/json" \ -d '{ "outerOrderSn": "ORD20260101001", "outerUid": "user-5001", "orderAmount": 120, "discountAmount": 0, "orderCurrency": "USD", "timeExpire": 1704070800000, "env": "H5", "rateExtra": 0.0025, "orderDesc": "Electronic accessories", "goods": [ { "goodsType": "01", "goodsCategory": "0000", "goodsCode": "SKU-ACC-001", "goodsName": "Wireless Charger", "goodsCount": 1, "goodsAmount": 120, "goodsCoin": "BTC" } ], "buyer": { "email": "buyer@example.com", "country": "US" }, "redirectUrl": "https://merchant.example.com/checkout/return", "deeplink": "merchantapp://checkout/result", "merchantName": "Redot Pay Connect", "subMerchantCode": "STORE_A" }'"Open API 通用响应"{ "code": "paramFormatError", "message": "request param invalid"}{ "code": "authorizationInvalid", "message": "authorizationInvalid invalid"}{ "code": "notInWhiteList", "message": "request ip not in the white list"}{ "code": "frequencyLimited", "message": "Too many requests, please try again later"}