创建订单
POST
https://youchaibao.com/api/order/create/
orders
请求参数
Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token示例:
Authorization: Bearer ********************
Body 参数application/json
type
enum<string>
Type
枚举值:
PACKAGEPOINT
method
enum<string>
Method
枚举值:
alipaywxpayqqpayUSDTTRC20
package_id
Package Id
Any of
point
Point
Any of
device
Device
Any of
默认值:
pc
示例
{
"type": "PACKAGE",
"method": "alipay",
"package_id": 0,
"point": 0,
"device": "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 'https://youchaibao.com/api/order/create/' \
--header 'Content-Type: application/json' \
--data-raw '{
"type": "PACKAGE",
"method": "alipay",
"package_id": 0,
"point": 0,
"device": "string"
}'
返回响应
🟢200成功
application/json
Body
code
integer
Code
默认值:
0
msg
string
Msg
默认值:
data
object
可选
order_id
string
Order Id
method
string
Method
type
string
Type
amount
number
Amount
status
integer
Status
user_id
integer
User Id
package_id
Package Id
point
Point
created_at
string <date-time>
Created At
payed_at
Payed At
pay_url
Pay Url
qrcode
Qrcode
示例
{
"code": 0,
"msg": "",
"data": {
"order_id": "string",
"method": "string",
"type": "string",
"amount": 0,
"status": 0,
"user_id": 0,
"package_id": 0,
"point": 0,
"created_at": "2019-08-24T14:15:22Z",
"payed_at": "2019-08-24T14:15:22Z",
"pay_url": "string",
"qrcode": "string"
}
}
🟠400请求有误