Xsolla-logoXsolla Developers
or
To Publisher Account

Get game keysWebhook POST

We will be making API calls to your server to obtain game activation codes after each successful payment.

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.

object

User details (object).

id
required
string

User ID.

name
string

Username.

object

Game keys details (object).

digital_content
string

Game SKU.

DRM
string

DRM platform used to distribute the game.

Responses
200

Return the game key.

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