Xsolla sends a webhook with the payment_account_add
type to the webhook URL whenever a user adds a payment account or saves a payment account when purchasing something inside the game. To receive this webhook, contact your Customer Success Manager or email csm@xsolla.com.
notification_type required | string Notification type. | ||||||||||||
object Custom project settings (object). | |||||||||||||
| |||||||||||||
object User details (object). | |||||||||||||
| |||||||||||||
object Payment account details (object). | |||||||||||||
|
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 d09695066c52c1b8bdae92f2d6eb59f5b5f89843' \ -d '{ "notification_type":"payment_account_add", "settings": { "project_id": 18404, "merchant_id": 2340 }, "user": { "ip": "127.0.0.1", "email": "email@example.com", "id": "1234567", "name": "John Smith", "country": "US", "zip": "12345" }, "payment_account": { "id": "12345678", "name": "email@example.com", "payment_method": "24", "country": "US", "type": "paypal" } }'
{- "error": {
- "code": "INVALID_USER",
- "message": "Invalid user"
}
}