If some parameters in the subscription (plan_id
, date_next_charge
) were changed, and in the case of every subscription renewal, Xsolla sends a webhook with the update_subscription
type to the webhook URL.
notification_type required | string Notification type. | ||||||||||
object Custom project settings (object). | |||||||||||
| |||||||||||
object User details (object). | |||||||||||
object Subscription 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 13342703ccaca5064ad33ba451d800c5e823db8f' \ -d '{ "notification_type": "update_subscription", "settings": { "project_id": 18404, "merchant_id": 2340 }, "user": { "id": "1234567", "name": "John Smith" }, "subscription": { "plan_id": "b5dac9c8", "subscription_id": "10", "product_id": "Demo Product", "date_next_charge": "2015-01-22T19:25:25+04:00" } }'
{- "error": {
- "code": "INVALID_USER",
- "message": "Invalid user"
}
}