发起支付
开发中
POST
/api/pay/prepay
请求参数
Header 参数
token
string
可选
示例值:
{{apiToken}}
scene
integer
可选
示例值:
2
Body 参数application/json
from
string
必需
pay_way
integer
必需
order_id
integer
订单ID
示例
{
"from": "order",
"pay_way": 2,
"order_id": 2
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST '/api/pay/prepay' \
--header 'token: {{apiToken}}' \
--header 'token;' \
--header 'scene: 2' \
--header 'Content-Type: application/json' \
--data-raw '{
"from": "order",
"pay_way": 2,
"order_id": 2
}'
返回响应
🟢200成功
application/json
Body
code
integer
必需
show
integer
必需
msg
string
必需
data
object
必需
from
string
必需
pay_way
string
必需
order_id
string
必需
示例
{
"code": 0,
"show": 1,
"msg": "openssl_sign(): Supplied key param cannot be coerced into a private key",
"data": {
"from": "order",
"pay_way": "2",
"order_id": "2"
}
}
修改于 2024-07-08 09:25:30