peyk.platforms.telegram.methods.edit_user_star_subscription

async peyk.platforms.telegram.methods.edit_user_star_subscription(self, user_id: int, telegram_payment_charge_id: str, is_canceled: bool) bool

Allows the bot to cancel or re-enable extension of a subscription paid in Telegram Stars. Returns True on success.

Parameters:
  • user_id – Identifier of the user whose subscription will be edited

  • telegram_payment_charge_id – Telegram payment identifier for the subscription

  • is_canceled – Pass True to cancel extension of the user subscription; the subscription must be active up to the end of the current subscription period. Pass False to allow the user to re-enable a subscription that was previously canceled by the bot.

Returns:

Result returned by Telegram on successful execution.

Return type:

bool