Xsolla-logoXsolla Developers
or
To Publisher Account

Activate keyWebhook POST

When a user activates a key, Xsolla sends a notification to your webhook URL.

Request
Request Body schema: application/json
notification_type
string

Notification type.

object

Custom project settings (object).

project_id
integer

Project ID. You can find this parameter in your Publisher Account next to the name of the project.

merchant_id
integer

Merchant ID.

key
string

Activation key.

sku
string

Unique key package ID.

user_id
string

User ID.

activation_date
string <datetime>

Key activation date in the YYYYMMDDHHMMSS format per ISO 8601.

user_country
string

User’s country. Two-letter uppercase ISO 3166-1 alpha-2 country code.

object

Object with regional restriction cluster settings. The cluster includes a restriction type and a list of countries, servers and locales for which the game is available.

sku
string

Unique cluster ID.

name
string

Cluster name.

types
Array of strings

Array of restriction types.

countries
Array of strings

Array of countries in the cluster.

servers
Array of strings

Array of game servers.

locales
Array of strings

Array of locales.

Responses
204

Return to indicate successful processing.

400

Return in case of an error in the provided information (e.g., a required parameter missing, failed authorization, etc.).

500

Return to indicate temporary errors with your servers.

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": {
    }
}