editUserStarSubscription()
Allows the bot to cancel or re-enable extension of a subscription paid in Telegram Stars. Returns True on success.
parameters
| parameter | type | required | description |
|---|---|---|---|
user_id | number | required | Identifier of the user whose subscription will be edited |
telegram_payment_charge_id | string | required | Telegram payment identifier for the subscription |
is_canceled | boolean | required | 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
boolean
usage in yaebal
not (yet) hard-typed on Api — call it through the generic .call<T>() escape hatch documented in @yaebal/types.
import type { EditUserStarSubscriptionParams } from "@yaebal/types";
await bot.api.call<boolean>("editUserStarSubscription", {
user_id: 123456789,
telegram_payment_charge_id: "...",
is_canceled: true,
} satisfies EditUserStarSubscriptionParams);context shortcut
also available as ctx.editUserStarSubscription() on
16
context types — see @yaebal/contexts.
/** Allows the bot to cancel or re-enable extension of a subscription paid in Telegram Stars. Returns *True* on success. */
ctx.editUserStarSubscription(params: Omit<EditUserStarSubscriptionParams, "user_id">)official Bot API docs: https://core.telegram.org/bots/api/#edituserstarsubscription