当满足以下条件时,艾克索拉将order_paid
webhook发送到指定的 URL:
payment
webhook的响应。order_paid
webhook包含所购商品和交易详细信息。
如果出现以下情况,将不会发送order_paid
webhook:
payment
webhook的响应。建议order_paid
webhook的处理速度小于3秒。
响应部分描述了预期的回答。您可以使用其他响应代码。根据响应码和自动付款退回功能的连接,艾克索拉侧的webhook处理逻辑如下:
响应代码 | 禁用了自动付款退回(默认) | 启用了自动付款退回 |
---|---|---|
400 、401 、402 、403 、404 、409 、422 、415 |
无操作 | 自动退款给用户 |
200 、201 、204 |
无操作 | 无操作 |
不同代码或对webhook无响应 | 在指定的时间间隔内发送多个webhook:2次间隔5分钟的尝试,7次间隔15分钟的尝试,10次间隔60分钟的尝试。 | 在指定的时间间隔内发送多个webhook:2次间隔5分钟的尝试,7次间隔15分钟的尝试,10次间隔60分钟的尝试。如果发送了所有webhook后仍未收到成功响应,则会向用户自动退款。 |
如需连接自动退款功能,请联系项目的帐户经理或发送邮件至am@xsolla.com。
notification_type required | string 通知类型。 | ||||||||||||||||||||||||||||||||||||||
required | Array of objects 用户所购商品的列表。 | ||||||||||||||||||||||||||||||||||||||
required | object 订单信息。 | ||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||
required | object 用户信息。 | ||||||||||||||||||||||||||||||||||||||
custom_parameters | object 附加信息。 |
返回以指示处理成功。
提供的信息出错时返回(例如,缺少必需的参数、授权失败等)。
{- "custom_parameters": { },
- "items": [ ],
- "notification_type": "string",
- "order": {
- "amount": "string",
- "comment": "string",
- "coupons": [
- {
- "code": "string",
- "external_id": "string"
}
], - "currency": "string",
- "currency_type": "real",
- "id": 0,
- "invoice_id": "string",
- "mode": "default",
- "platform": "xsolla",
- "promocodes": [
- {
- "code": "string",
- "external_id": "string"
}
], - "promotions": [
- {
- "amount_with_discount": "string",
- "amount_without_discount": "string",
- "sequence": 0
}
], - "status": "string"
}, - "user": {
- "email": "string",
- "external_id": "string"
}
}