艾克索拉向Webhook
URL发送一个user_validation
类型的Webhook以验证用户是否已在游戏中注册。该请求作为付款流程的一部分会被多次发送:
done
时使用任何支付方式付款时都会发送该请求。
在发布商帐户中保存 Webhook URL 时,可以授予在 Webhook 中接收详细信息的权限。为此,请在发布商帐户的项目设置 > Webhooks> 高级设置部分中将所需开关设置为打开状态。
注:
如果是在2025年1月22日或之前注册的发布商帐户,可在项目设置> Webhooks> 测试 > 付款> 高级设置 部分中找到这些开关。
开关 | 描述 |
---|---|
仅发送不含敏感数据的必要用户参数 | Webhook中仅传递用户的以下信息:
|
发送自定义参数 | 自定义令牌参数的信息在webhook中传递。 |
notification_type required | string 通知类型。 | ||||||||||||
object 带有自定义项目设置的对象。 | |||||||||||||
| |||||||||||||
object 用户详情(对象)。 | |||||||||||||
|
返回以指示处理成功。
提供的信息出错时返回(例如,缺少必需的参数、授权失败等)。
返回以指示您的服务器存在的暂时性错误。
curl -v 'https://your.hostname/your/uri' \ -X POST \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -H 'Authorization: Signature 13342703ccaca5064ad33ba451d800c5e823db8f' \ -d '{ "notification_type":"user_validation", "settings": { "project_id": 18404, "merchant_id": 2340 }, "user": { "ip": "127.0.0.1", "phone": "18777976552", "email": "email@example.com", "id": "1234567", "name": "John Smith", "country": "US" } }'
{- "error": {
- "code": "INCORRECT_AMOUNT",
- "message": "Incorrect amount"
}
}