如果需要手动更改用户余额,可以使用“Internal”操作类型。
id_operation | integer 艾克索拉数据库中的操作ID。 | ||||
notification_type | string 通知类型。 | ||||
operation_type | string 操作类型。 | ||||
object 带有自定义项目设置的对象。 | |||||
| |||||
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 '{ "settings": { "project_id": 18404, "merchant_id": 2340 }, "virtual_currency_balance": { "old_value": "0", "new_value": "100", "diff": "100" }, "user": { "name": "Xsolla User", "id": "1234567", "email": "email@example.com" }, "operation_type": "internal", "notification_type": "user_balance_operation", "id_operation": "67002" }'
{- "error": {
- "code": "INCORRECT_AMOUNT",
- "message": "Incorrect amount"
}
}