Cancel a bot subscription
boolFalse#bc799737 = Bool;
boolTrue#997275b5 = Bool;
---functions---
payments.botCancelStarsSubscription#6dfa0622 flags:# restore:flags.0?true user_id:InputUser charge_id:string = Bool;
Name | Type | Description |
---|---|---|
flags | # | Flags, see TL conditional fields |
restore | flags.0?true | If not set, disables autorenewal of the subscriptions, and prevents the user from reactivating the subscription once the current period expires: a subscription cancelled by the bot will have the starsSubscription.bot_canceled flag set. The bot can can partially undo this operation by setting this flag: this will allow the user to reactivate the subscription. |
user_id | InputUser | The ID of the user whose subscription should be (un)cancelled |
charge_id | string | The provider_charge_id from the messageActionPaymentSentMe service message sent to the bot for the first subscription payment. |
Code | Type | Description |
---|---|---|
400 | USER_ID_INVALID | The provided user ID is invalid. |
Represents a Telegram Star subscription ยป.
A user just sent a payment to me (a bot)
Bots and channels may create subscriptions, periodically charging users a certain amount of Telegram Stars in exchange for content and services.