InputStorePaymentPurpose

class pyrogram.raw.base.InputStorePaymentPurpose

Info about a Telegram Premium purchase

Constructors:

This base type has 8 constructors available.

InputStorePaymentAuthCode

Indicates payment for a login code.

InputStorePaymentGiftPremium

Info about a gifted Telegram Premium purchase

InputStorePaymentPremiumGiftCode

Used to gift Telegram Premium subscriptions only to some specific subscribers of a channel/supergroup or to some of our contacts, see here » for more info on giveaways and gifts.

InputStorePaymentPremiumGiveaway

Used to pay for a giveaway, see here » for more info.

InputStorePaymentPremiumSubscription

Info about a Telegram Premium purchase

InputStorePaymentStarsGift

Used to gift Telegram Stars to a friend.

InputStorePaymentStarsGiveaway

Used to pay for a star giveaway, see here » for more info.

InputStorePaymentStarsTopup

Used to top up the Telegram Stars balance of the current account.

TL Schema


Parameter Tree

InputStorePaymentPurpose
│ ├── restore → true (optional)
│ └── upgrade → true (optional)
│ ├── user_id → InputUser
│ │ ├── InputUserEmpty
│ │ ├── InputUserSelf
│ │ ├── InputUser
│ │ └── InputUserFromMessage
│ ├── currency → string
│ └── amount → long
│ ├── users → Vector < InputUser >
│ │ ├── InputUserEmpty
│ │ ├── InputUserSelf
│ │ ├── InputUser
│ │ │ ├── user_id → long
│ │ │ └── access_hash → long
│ │ └── InputUserFromMessage
│ │ ├── peer → InputPeer
│ │ │ ├── InputPeerEmpty
│ │ │ ├── InputPeerSelf
│ │ │ ├── InputPeerChat
│ │ │ ├── InputPeerUser
│ │ │ ├── InputPeerChannel
│ │ │ ├── InputPeerUserFromMessage
│ │ │ └── InputPeerChannelFromMessage
│ │ ├── msg_id → int
│ │ └── user_id → long
│ ├── boost_peer → InputPeer (optional)
│ │ ├── InputPeerEmpty
│ │ ├── InputPeerSelf
│ │ ├── InputPeerChat
│ │ ├── InputPeerUser
│ │ ├── InputPeerChannel
│ │ ├── InputPeerUserFromMessage
│ │ └── InputPeerChannelFromMessage
│ ├── currency → string
│ ├── amount → long
│ └── message → TextWithEntities (optional)
│ └── TextWithEntities
│ ├── text → string
│ └── entities → Vector < MessageEntity >
│ ├── MessageEntityUnknown
│ ├── MessageEntityMention
│ ├── MessageEntityHashtag
│ ├── MessageEntityUrl
│ ├── MessageEntityEmail
│ ├── MessageEntityBold
│ ├── MessageEntityItalic
│ ├── MessageEntityCode
│ ├── MessageEntityPre
│ ├── MessageEntityTextUrl
│ ├── MessageEntityPhone
│ ├── MessageEntityCashtag
│ ├── MessageEntityStrike
│ ├── MessageEntityBankCard
│ ├── MessageEntitySpoiler
│ ├── only_new_subscribers → true (optional)
│ ├── winners_are_visible → true (optional)
│ ├── boost_peer → InputPeer
│ │ ├── InputPeerEmpty
│ │ ├── InputPeerSelf
│ │ ├── InputPeerChat
│ │ ├── InputPeerUser
│ │ ├── InputPeerChannel
│ │ ├── InputPeerUserFromMessage
│ │ └── InputPeerChannelFromMessage
│ ├── additional_peers → Vector < InputPeer > (optional)
│ │ ├── InputPeerEmpty
│ │ ├── InputPeerSelf
│ │ ├── InputPeerChat
│ │ ├── InputPeerUser
│ │ │ ├── user_id → long
│ │ │ └── access_hash → long
│ │ ├── InputPeerChannel
│ │ │ ├── channel_id → long
│ │ │ └── access_hash → long
│ │ ├── InputPeerUserFromMessage
│ │ │ ├── peer → InputPeer
│ │ │ │ ├── InputPeerEmpty
│ │ │ │ ├── InputPeerSelf
│ │ │ │ ├── InputPeerChat
│ │ │ │ ├── InputPeerUser
│ │ │ │ ├── InputPeerChannel
│ │ │ │ ├── InputPeerUserFromMessage
│ │ │ │ └── InputPeerChannelFromMessage
│ │ │ ├── msg_id → int
│ │ │ └── user_id → long
│ │ └── InputPeerChannelFromMessage
│ │ ├── peer → InputPeer
│ │ │ ├── InputPeerEmpty
│ │ │ ├── InputPeerSelf
│ │ │ ├── InputPeerChat
│ │ │ ├── InputPeerUser
│ │ │ ├── InputPeerChannel
│ │ │ ├── InputPeerUserFromMessage
│ │ │ └── InputPeerChannelFromMessage
│ │ ├── msg_id → int
│ │ └── channel_id → long
│ ├── countries_iso2 → Vector < string > (optional)
│ ├── prize_description → string (optional)
│ ├── random_id → long
│ ├── until_date → int
│ ├── currency → string
│ └── amount → long
│ ├── stars → long
│ ├── currency → string
│ ├── amount → long
│ └── spend_purpose_peer → InputPeer (optional)
│ ├── InputPeerEmpty
│ ├── InputPeerSelf
│ ├── InputPeerChat
│ ├── InputPeerUser
│ ├── InputPeerChannel
│ ├── user_id → InputUser
│ │ ├── InputUserEmpty
│ │ ├── InputUserSelf
│ │ ├── InputUser
│ │ └── InputUserFromMessage
│ ├── stars → long
│ ├── currency → string
│ └── amount → long
│ ├── only_new_subscribers → true (optional)
│ ├── winners_are_visible → true (optional)
│ ├── stars → long
│ ├── boost_peer → InputPeer
│ │ ├── InputPeerEmpty
│ │ ├── InputPeerSelf
│ │ ├── InputPeerChat
│ │ ├── InputPeerUser
│ │ ├── InputPeerChannel
│ │ ├── InputPeerUserFromMessage
│ │ └── InputPeerChannelFromMessage
│ ├── additional_peers → Vector < InputPeer > (optional)
│ │ ├── InputPeerEmpty
│ │ ├── InputPeerSelf
│ │ ├── InputPeerChat
│ │ ├── InputPeerUser
│ │ │ ├── user_id → long
│ │ │ └── access_hash → long
│ │ ├── InputPeerChannel
│ │ │ ├── channel_id → long
│ │ │ └── access_hash → long
│ │ ├── InputPeerUserFromMessage
│ │ │ ├── peer → InputPeer
│ │ │ │ ├── InputPeerEmpty
│ │ │ │ ├── InputPeerSelf
│ │ │ │ ├── InputPeerChat
│ │ │ │ ├── InputPeerUser
│ │ │ │ ├── InputPeerChannel
│ │ │ │ ├── InputPeerUserFromMessage
│ │ │ │ └── InputPeerChannelFromMessage
│ │ │ ├── msg_id → int
│ │ │ └── user_id → long
│ │ └── InputPeerChannelFromMessage
│ │ ├── peer → InputPeer
│ │ │ ├── InputPeerEmpty
│ │ │ ├── InputPeerSelf
│ │ │ ├── InputPeerChat
│ │ │ ├── InputPeerUser
│ │ │ ├── InputPeerChannel
│ │ │ ├── InputPeerUserFromMessage
│ │ │ └── InputPeerChannelFromMessage
│ │ ├── msg_id → int
│ │ └── channel_id → long
│ ├── countries_iso2 → Vector < string > (optional)
│ ├── prize_description → string (optional)
│ ├── random_id → long
│ ├── until_date → int
│ ├── currency → string
│ ├── amount → long
│ └── users → int
├── restore → true (optional)
├── phone_number → string
├── phone_code_hash → string
├── premium_days → int
├── currency → string
└── amount → long

Example