- 文档介绍
- 认证
- 账户
- 余额
- 申请收款账户
- 收款账户
- 收单
- 入账
- 汇率
- 换汇
- 付款
- 转账
- 流水
- 账户实名更新请求
- 收款人
- 模拟
- Webhooks
- 通知
H5支付
POST
/v3/acquiring/payments
请求参数
Header 参数
Authorization
string
可选
默认值:
Bearer {{access_token}}
Body 参数application/json
request_id
string
必需
account_id
string
账户 ID
payment_type
enum<string>
支付方式
枚举值:
WECHAT_PAY
payment_flow
enum<string>
支付类型
枚举值:
SCANAPPMINI_PROGRAMOFFICIAL_ACCOUNTH5
示例值:
H5
order_description
string
必需
notify_url
string | null
可选
payment
object (PaymentDetail)
支付信息
amount
integer <int64>
必需
currency
string
标价币种
expiry_time
string <date-time> | null
可选
settlement
object (SettlementDetailRequest)
结算配置
currency
string
结算币种
metadata
object | null
附加参数
额外字段
object
附加参数
示例
{
"request_id": "string",
"account_id": "string",
"payment_type": "WECHAT_PAY",
"payment_flow": "SCAN",
"order_description": "string",
"notify_url": "string",
"payment": {
"amount": 0,
"currency": "string",
"expiry_time": "2019-08-24T14:15:22Z"
},
"settlement": {
"currency": "string"
},
"metadata": {
"property1": {},
"property2": {}
}
}
示例代码
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://demo-api.easypayx.com/v3/acquiring/payments' \
--header 'Authorization: Bearer ' \
--header 'Content-Type: application/json' \
--data-raw '{
"request_id": "string",
"account_id": "string",
"payment_type": "WECHAT_PAY",
"payment_flow": "SCAN",
"order_description": "string",
"notify_url": "string",
"payment": {
"amount": 0,
"currency": "string",
"expiry_time": "2019-08-24T14:15:22Z"
},
"settlement": {
"currency": "string"
},
"metadata": {
"property1": {},
"property2": {}
}
}'
返回响应
🟢200OK
application/json
Body
id
string
支付 ID
request_id
string
商户订单 ID
account_id
string
账户 ID
payment_type
enum<string>
支付方式
枚举值:
WECHAT_PAY
payment_flow
enum<string>
支付类型
枚举值:
SCANAPPMINI_PROGRAMOFFICIAL_ACCOUNTH5
order_description
string
订单描述
notify_url
string | null
支付通知地址
payment
object
必需
amount
integer <int64>
必需
currency
string
标价币种
expiry_time
string <date-time> | null
可选
next_action
object
必需
mweb_url
string
支付跳转地址
额外字段
object
支付返回参数
settlement
object
必需
currency
string
结算币种
exchange_rate
string | null
汇率
metadata
object | null
附加参数
status
enum<string>
支付状态
枚举值:
INITPENDINGSUCCESSFAILEDCANCELED
create_time
string <date-time>
创建时间
complete_time
string <date-time> | null
支付完成时间
示例
{
"id": "string",
"request_id": "string",
"account_id": "string",
"payment_type": "WECHAT_PAY",
"payment_flow": "SCAN",
"order_description": "string",
"notify_url": "string",
"payment": {
"amount": 0,
"currency": "string",
"expiry_time": "2019-08-24T14:15:22Z"
},
"next_action": {
"mweb_url": "string",
"property1": {},
"property2": {}
},
"settlement": {
"currency": "string",
"exchange_rate": "string"
},
"metadata": {},
"status": "INIT",
"create_time": "2019-08-24T14:15:22Z",
"complete_time": "2019-08-24T14:15:22Z"
}
🟠400Bad Request
🟠404Not Found
🟠409Conflict
🔴500Internal Server Error
🔴503Service Unavailable
修改于 2024-09-02 07:41:50