payments.botCancelStarsSubscription
Cancel a bot subscription
Cancel a [bot subscription](https://core.telegram.org/api/subscriptions.md#bot-subscriptions)
| Name | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
restore | true | Nein | 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 | Ja | The ID of the user whose subscription should be (un)cancelled |
charge_id | string | Ja | 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. |
Antworten
Bool
MTProto RPC
- 400 · CHARGE_ID_INVALID – Die angegebene charge_id ist ungültig.
- 400 · USER_ID_INVALID – Die angegebene Benutzer-ID ist ungültig.