- 文档介绍
- 认证
- 账户
- 余额
- 申请收款账户
- 收款账户
- 收单
- 入账
- 汇率
- 换汇
- 付款
- 转账
- 流水
- 账户实名更新请求
- 收款人
- 模拟
- Webhooks
- 通知
退款
POST
/v3/acquiring/refunds
请求参数
Header 参数
Authorization
string
可选
默认值:
Bearer {{access_token}}
Body 参数application/json
request_id
string
商户订单 ID
payment_id
string | null
可选
payment_request_id
string | null
可选
account_id
string
账户 ID
notify_url
string | null
退款通知地址
refund
object
必需
amount
integer <int64>
退款金额
reason
string
退款原因
metadata
object | null
附加参数
额外字段
object
附加参数
示例
{
"request_id": "string",
"payment_id": "string",
"payment_request_id": "string",
"account_id": "string",
"notify_url": "string",
"refund": {
"amount": 0,
"reason": "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/refunds' \
--header 'Authorization: Bearer ' \
--header 'Content-Type: application/json' \
--data-raw '{
"request_id": "string",
"payment_id": "string",
"payment_request_id": "string",
"account_id": "string",
"notify_url": "string",
"refund": {
"amount": 0,
"reason": "string"
},
"metadata": {
"property1": {},
"property2": {}
}
}'
返回响应
🟢200OK
application/json
Body
data
object (RefundResponse)
可选
id
string
退款 ID
request_id
string
退款幂等参数
payment_id
string
支付 ID
payment_request_id
string
支付幂等参数
account_id
string
账户 ID
payment_type
enum<string>
必需
枚举值:
WECHAT_PAY
notify_url
string | null
退款通知地址
refund
object
必需
settlement
object
必需
payer
object
必需
status
enum<string>
退款状态
枚举值:
INITPENDINGSUCCESSFAILED
create_time
string <date-time>
创建时间
complete_time
string <date-time> | null
退款完成时间
示例
{
"data": {
"id": "string",
"request_id": "string",
"payment_id": "string",
"payment_request_id": "string",
"account_id": "string",
"payment_type": "WECHAT_PAY",
"notify_url": "string",
"refund": {
"amount": 0,
"currency": "string",
"reason": "string"
},
"settlement": {
"currency": "string",
"exchange_rate": "string"
},
"payer": {
"amount": 0,
"currency": "string"
},
"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
修改于 2023-05-26 04:34:06