Xsolla-logoXsolla Developers
前往发布商帐户

用户余额:退款Webhook POST

用户取消支付时,我们会向您发送有关用户余额变化的特别通知。

Request
Request Body schema: application/json
required
object

交易ID。

date
string

交易日期。

id
integer

交易ID。

id_operation
integer

艾克索拉数据库中的操作ID。

Array of objects

购买项中的虚拟物品。

Array
amount
integer

物品数量。

sku
string

物品ID。

items_operation_type
string

游戏内购买的操作类型。

notification_type
string

通知类型。

operation_type
string

操作类型。

object

带有自定义项目设置的对象。

merchant_id
integer

商户ID。

project_id
integer

项目编号。您可以在您的发布商帐户项目名称旁边。

object

用户详情(对象)。

id
required
string

用户ID。

email
string

用户电子邮件。

name
string

用户名。

object

带有系统中用户余额相关数据的对象。

diff
string

购买的游戏货币的金额。

new_value
string

处理当前操作之后新的用户余额值。

old_value
string

处理当前操作之前旧的用户余额值。

Responses
204

返回以指示处理成功。

400

提供的信息出错时返回(例如,缺少必需的参数、授权失败等)。

500

返回以指示您的服务器存在的暂时性错误。

Request samples
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": "0",
            "diff": "0"
        },
        "user": {
            "name": "Xsolla User",
            "id": "1234567",
            "email": "email@example.com"
        },
        "transaction": {
            "id": "123456789",
            "date": "2015-05-19T15:54:40+03:00"
        },
        "operation_type": "cancellation",
        "notification_type": "user_balance_operation",
        "items_operation_type": "remove",
            "items": [{
                "sku": "com.xsolla.item_1468",
                "amount": "2"
            }],
        "id_operation": "66989"
    }'
Response samples
application/json
{
  • "error": {
    }
}