When a transaction is declined during an Anti-fraud system check, Xsolla sends transaction details in the webhook with the afs_reject
type to the webhook URL. To receive this webhook, contact your Customer Success Manager or email csm@xsolla.com.
When you save the webhook URL in Publisher Account, you can give permissions to receive detailed information in webhooks. To do that, set the following toggle 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 |
---|---|
Show info about transactions via saved payment methods | Information is passed in the following custom parameters of the webhook:
|
notification_type required | string Notification type. | ||||||||||||||
required | object Transaction details (object). | ||||||||||||||
object Custom project settings (object). | |||||||||||||||
| |||||||||||||||
object User details (object). | |||||||||||||||
| |||||||||||||||
object Refund 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 \ -d '{ "notification_type": "afs_reject", "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" }, "transaction": { "id": 1, "external_id": 1, "dry_run": 1, "agreement": 1 }, "refund_details": { "code": 4, "reason": "Potential fraud" } }'
{- "error": {
- "code": "INVALID_USER",
- "message": "Invalid user"
}
}