Link Search Menu Expand Document

Constructor: starsSubscription

Back to constructors index

Represents a Telegram Star subscription ».

Attributes:

NameTypeRequiredDescription
canceledBoolOptionalWhether this subscription was cancelled.
can_refulfillBoolOptionalWhether we left the associated private channel, but we can still rejoin it using payments.fulfillStarsSubscription because the current subscription period hasn’t expired yet.
missing_balanceBoolOptionalWhether this subscription has expired because there are not enough stars on the user’s balance to extend it.
bot_canceledBoolOptionalSet if this bot subscription was cancelled by the bot
idstringYesSubscription ID.
peerlongYesIdentifier of the associated private chat.
until_dateintYesExpiration date of the current subscription period.
pricingStarsSubscriptionPricingYesPricing of the subscription in Telegram Stars.
chat_invite_hashstringOptionalInvitation link, used to renew the subscription after cancellation or expiration.
titlestringOptionalFor bot subscriptions, the title of the subscription invoice
photoWebDocumentOptionalFor bot subscriptions, the photo from the subscription invoice
invoice_slugstringOptionalFor bot subscriptions, the identifier of the subscription invoice

Type: StarsSubscription

Example:

$starsSubscription = ['_' => 'starsSubscription', 'canceled' => Bool, 'can_refulfill' => Bool, 'missing_balance' => Bool, 'bot_canceled' => Bool, 'id' => 'string', 'peer' => long, 'until_date' => int, 'pricing' => StarsSubscriptionPricing, 'chat_invite_hash' => 'string', 'title' => 'string', 'photo' => WebDocument, 'invoice_slug' => 'string'];