Xsolla-logoXsolla Developers
前往发布商帐户

激活密钥Webhook POST

用户激活密钥时,艾克索拉会向您的Webhook URL发送通知。

Request
Request Body schema: application/json
activation_date
string <datetime>

密钥激活日期,格式为ISO 8601规定的YYYYMMDDHHMMSS格式。

key
string

激活密钥。

notification_type
string

通知类型。

object

包含区域限制簇设置的对象。该簇包含一个限制类型和该游戏适用的国家/地区、服务器和区域设置的列表。

countries
Array of strings

簇中的国家/地区数组。

locales
Array of strings

区域设置数组。

name
string

簇名称。

servers
Array of strings

游戏服务器数组。

sku
string

唯一簇ID。

types
Array of strings

限制类型数组。

object

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

merchant_id
integer

商户ID。

project_id
integer

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

sku
string

唯一密钥套餐ID。

user_country
string

用户所在国家/地区。使用ISO 3166-1 alpha-2 标准规定的2字母组合表示国家/地区。

user_id
string

用户ID。

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 '{
  "notification_type": "redeem_key",
  "settings": {
        "project_id": 18404,
        "merchant_id": 2340
  },
  "key": "wqdqwwddq9099022",
  "sku": "com.xsolla.key_123",
  "user_id": "sample_user",
  "activation_date": "2018-11-20T08:38:51+03:00",
  "user_country": "EN",
  "restriction": {
      "name": "cls_1",
      "types": [
          "activation"
        ],
        "countries": [
            "RU"
        ]
    }
}'
Response samples
application/json
{
  • "error": {
    }
}