Xsolla sends a webhook with the user_validation
type to the webhook URL to
verify that a user is registered in the game. The request is sent multiple
times as part of the payment process:
done
The request is sent when paying with any payment methods.
When you save the webhook URL in Publisher Account, you can give permissions to receive detailed information in webhooks. To do that, set the necessary toggles to active in Publisher Account in the Project settings > Webhooks > Advanced settings section.
Note
If you registered in Publisher Account on or before January 22, 2025, you can find the toggles in the Project settings > Webhooks > Testing > Payments > Advanced settings section.
Toggle | Description |
---|---|
Send only necessary user parameters without sensitive data | Only the following information about the user is passed in the webhook:
|
Send custom parameters | Information about custom token parameters is passed in the webhook. |
notification_type required | string Tipo de notificação. | ||||||||||||
object Configurações personalizadas do projeto (objeto). | |||||||||||||
| |||||||||||||
object Dados do usuário (objeto). | |||||||||||||
|
Retorne para indicar o processamento bem-sucedido.
Retorne em caso de erro nas informações fornecidas (por exemplo, um parâmetro obrigatório ausente, falha na autorização, etc.).
Retorne para indicar erros temporários com seus servidores.
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":"user_validation", "settings": { "project_id": 18404, "merchant_id": 2340 }, "user": { "ip": "127.0.0.1", "phone": "18777976552", "email": "email@example.com", "id": "1234567", "name": "John Smith", "country": "US" } }'
{- "error": {
- "code": "INCORRECT_AMOUNT",
- "message": "Incorrect amount"
}
}