payments.botCancelStarsSubscription
Cancel a bot subscription
Cancel a [bot subscription](https://core.telegram.org/api/subscriptions.md#bot-subscriptions)
| الاسم | النوع | مطلوب | الوصف |
|---|---|---|---|
restore | 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](https://core.telegram.org/constructor/starsSubscription.md).`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](https://core.telegram.org/constructor/messageActionPaymentSentMe.md) service message sent to the bot for the first subscription payment. |
الردود
Bool
MTProto RPC
- 400 · CHARGE_ID_INVALID — The specified charge_id is invalid.
- 400 · USER_ID_INVALID — The provided user ID is invalid.