When a user activates a key, Xsolla sends a notification to your webhook URL.
notification_type | string Notification type. | ||||
object Custom project settings (object). | |||||
| |||||
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. | |||||
Return to indicate successful processing.
Return in case of an error in the provided information (e.g., a required parameter missing, failed authorization, etc.).
Return to indicate temporary errors with your servers.
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" ] } }'
{- "error": {
- "code": "INVALID_USER",
- "message": "Invalid user"
}
}