Interface: CreateOrderParams
Properties
amount
amount:
string
金额(元)字符串。务必以服务端价格为准,绝不信任前端传值。
attach?
optionalattach?:string
≤128 字符,webhook 原样带回(如内部用户 ID)。
channel?
optionalchannel?:"alipay"|"chinaums"
支付渠道:缺省或 'alipay'=支付宝;'chinaums'=银商,形态由 payMode 决定: 'qrcode'=聚合码(一张码微信/支付宝/云闪付都能扫,payUrl 是二维码内容,前端渲染 成码图、不能 iframe);'redirect'=公众号支付(微信/支付宝/云闪付 App 内打开的 H5 页面把用户 302 到 payUrl,银商收银台唤起支付,商户无需自有公众号)。
expireMinutes?
optionalexpireMinutes?:number
未支付自动关单时限(分钟),默认 15。
outTradeNo
outTradeNo:
string
商户单号:唯一,也是入账幂等键。
payMode
payMode:
"qrcode"|"redirect"
qrcode=返回可展示的收款地址(支付宝可 iframe / 银商渲染成码图);redirect=整页跳转地址。
qrcodeWidth?
optionalqrcodeWidth?:number
returnUrl?
optionalreturnUrl?:string
redirect 模式支付完成后的回跳地址(http/https,≤255 字符)。 仅作页面回跳展示,入账一律以 webhook / 查单为准。
subject
subject:
string