Layer 227
method Users
payments.botCancelStarsSubscription#6dfa0622 flags:# restore:flags.0?true user_id:InputUser charge_id:string = Bool;

Parameters

Name Type Description
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 stars Subscription. 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.
UserId InputUser The ID of the user whose subscription should be (un)cancelled
ChargeId string The provider_charge_id from the message Action Payment Sent Me service message sent to the bot for the first subscription payment.

Returns

Bool

Gogram Example

// PaymentsBotCancelStarsSubscription - positional arguments
result, err := client.PaymentsBotCancelStarsSubscription(nil, &tg.InputUserSelf{}, "Hello, World!")
if err != nil {
    // handle error
}
// result is *tg.Bool

Possible Errors

Code Type Description
400 CHARGE_ID_INVALID The specified charge_id is invalid.
400 USER_ID_INVALID The provided user ID is invalid.