订单新增
POST
/v1/order/add
请求参数
Body 参数application/json
productId
integer
充值产品ID
outOrderNo
string
必需
businessParams
object
可选
account
string
可选
buyerClientIp
string
用户终端IP
buyNum
integer
购买数量,默认1
remark
string
备注
salesChannel
string
必需
safePrice
integer
可选
finalPrice
integer
可选
notifyUrl
string
必需
示例
{
"productId": "194f445830a001",
"outOrderNo": "2025022515013960953938350082",
"businessParams": {
"account": "13666666666"
},
"buyerClientIp": "192.168.0.1",
"buyNum": "3",
"remark": "",
"salesChannel": "",
"safePrice": "1"
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST '/v1/order/add' \
--header 'Content-Type: application/json' \
--data-raw '{
"productId": "194f445830a001",
"outOrderNo": "2025022515013960953938350082",
"businessParams": {
"account": "13666666666"
},
"buyerClientIp": "192.168.0.1",
"buyNum": "3",
"remark": "",
"salesChannel": "",
"safePrice": "1"
}'
返回响应
🟢200成功
application/json
Body
code
integer
必需
msg
string
必需
data
object
必需
tradeNo
string
平台订单号
salesPrice
integer
售价(单位:分)
outOrderNo
string
商户侧订单号
示例
{
"code": 200,
"msg": "操作成功",
"data": {
"tradeNo": "2025021210589188810864250881",
"salesPrice": 10,
"outOrderNo": "2025021210589188800898584577"
}
}
修改于 2025-04-01 12:28:42