Xsolla-logoXsolla Developers
前往发布商帐户

获取游戏密钥Webhook POST

在用户每次成功购买后,为了获取游戏激活码我们将调用API访问您的服务器。

Request
Request Body schema: application/json
notification_type
string

通知类型。

object

游戏密钥详细信息(对象)。

DRM
string

游戏应对其可用的DRM。

digital_content
string

游戏的SKU。

object

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

merchant_id
integer

商户ID。

project_id
integer

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

object

用户详情(对象)。

id
required
string

用户ID。

name
string

用户名。

Responses
200

返回游戏密钥。

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": "get_pincode",
        "settings": {
          "project_id": 18404,
          "merchant_id": 2340
        },
        "user": {
            "id": "1234567",
            "name": "Xsolla User"
        },
        "pin_code": {
            "digital_content": "Game SKU",
            "DRM": "Steam"
        }
    }'
Response samples
application/json
{
  • "pin_code": "AAA-BBB-CCC-DDD"
}