InputInvoice

class pyrogram.raw.base.InputInvoice

An invoice

Constructors:

This base type has 15 constructors available.

InputInvoiceBusinessBotTransferStars

Transfer stars from the balance of a user account connected to a business bot, to the balance of the business bot, see here » for more info on the full flow.

InputInvoiceChatInviteSubscription

Used to pay for a Telegram Star subscription ».

InputInvoiceMessage

An invoice contained in a messageMediaInvoice message or paid media ».

InputInvoicePremiumAuthCode

{schema}

InputInvoicePremiumGiftCode

Used if the user wishes to start a channel/supergroup giveaway or send some giftcodes to members of a channel/supergroup, in exchange for boosts.

InputInvoicePremiumGiftStars

Used to gift a Telegram Premium subscription to another user, paying with Telegram Stars.

InputInvoiceSlug

An invoice slug taken from an invoice deep link or from the premium_invoice_slug app config parameter »

InputInvoiceStarGift

Used to buy a Telegram Star Gift, see here » for more info.

InputInvoiceStarGiftAuctionBid

{schema}

InputInvoiceStarGiftDropOriginalDetails

{schema}

InputInvoiceStarGiftPrepaidUpgrade

Separately prepay for the upgrade of a gift ».

InputInvoiceStarGiftResale

Used to buy a collectible gift currently up on resale, see here for more info on the full flow.

InputInvoiceStarGiftTransfer

Used to pay to transfer a collectible gift to another peer, see the gifts » documentation for more info.

InputInvoiceStarGiftUpgrade

Used to pay to upgrade a Gift to a collectible gift, see the collectible gifts » documentation for more info on the full flow.

InputInvoiceStars

Used to top up the Telegram Stars balance of the current account or someone else's account, or to start a Telegram Star giveaway ».

TL Schema


Parameter Tree

InputInvoice
│ ├── peer → InputPeer
│ │ ├── InputPeerEmpty
│ │ ├── InputPeerSelf
│ │ ├── InputPeerChat
│ │ ├── InputPeerUser
│ │ ├── InputPeerChannel
│ │ ├── InputPeerUserFromMessage
│ │ └── InputPeerChannelFromMessage
│ └── msg_id → int
│ └── slug → string
│ ├── purpose → InputStorePaymentPurpose
│ │ │ ├── restore → true (optional)
│ │ │ └── upgrade → true (optional)
│ │ │ ├── user_id → InputUser
│ │ │ │ ├── InputUserEmpty
│ │ │ │ ├── InputUserSelf
│ │ │ │ ├── InputUser
│ │ │ │ └── InputUserFromMessage
│ │ │ ├── currency → string
│ │ │ └── amount → long
│ │ │ ├── users → Vector < InputUser >
│ │ │ │ ├── InputUserEmpty
│ │ │ │ ├── InputUserSelf
│ │ │ │ ├── InputUser
│ │ │ │ └── InputUserFromMessage
│ │ │ ├── boost_peer → InputPeer (optional)
│ │ │ │ ├── InputPeerEmpty
│ │ │ │ ├── InputPeerSelf
│ │ │ │ ├── InputPeerChat
│ │ │ │ ├── InputPeerUser
│ │ │ │ ├── InputPeerChannel
│ │ │ │ ├── InputPeerUserFromMessage
│ │ │ │ └── InputPeerChannelFromMessage
│ │ │ ├── currency → string
│ │ │ ├── amount → long
│ │ │ └── message → TextWithEntities (optional)
│ │ │ └── TextWithEntities
│ │ │ ├── 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
│ │ │ │ ├── InputPeerChannel
│ │ │ │ ├── InputPeerUserFromMessage
│ │ │ │ └── InputPeerChannelFromMessage
│ │ │ ├── countries_iso2 → Vector < string > (optional)
│ │ │ ├── prize_description → string (optional)
│ │ │ ├── random_id → long
│ │ │ ├── until_date → int
│ │ │ ├── currency → string
│ │ │ └── amount → long
│ │ ├── InputStorePaymentStarsTopup
│ │ │ ├── stars → long
│ │ │ ├── currency → string
│ │ │ ├── amount → long
│ │ │ └── spend_purpose_peer → InputPeer (optional)
│ │ │ ├── InputPeerEmpty
│ │ │ ├── InputPeerSelf
│ │ │ ├── InputPeerChat
│ │ │ ├── InputPeerUser
│ │ │ ├── InputPeerChannel
│ │ │ ├── InputPeerUserFromMessage
│ │ │ └── InputPeerChannelFromMessage
│ │ ├── InputStorePaymentStarsGift
│ │ │ ├── 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
│ │ │ │ ├── InputPeerChannel
│ │ │ │ ├── InputPeerUserFromMessage
│ │ │ │ └── InputPeerChannelFromMessage
│ │ │ ├── countries_iso2 → Vector < string > (optional)
│ │ │ ├── prize_description → string (optional)
│ │ │ ├── random_id → long
│ │ │ ├── until_date → int
│ │ │ ├── currency → string
│ │ │ ├── amount → long
│ │ │ └── users → int
│ │ └── InputStorePaymentAuthCode
│ │ ├── restore → true (optional)
│ │ ├── phone_number → string
│ │ ├── phone_code_hash → string
│ │ ├── premium_days → int
│ │ ├── currency → string
│ │ └── amount → long
│ └── option → PremiumGiftCodeOption
│ └── PremiumGiftCodeOption
│ ├── users → int
│ ├── months → int
│ ├── store_product → string (optional)
│ ├── store_quantity → int (optional)
│ ├── currency → string
│ └── amount → long
│ └── purpose → InputStorePaymentPurpose
│ │ ├── restore → true (optional)
│ │ └── upgrade → true (optional)
│ │ ├── user_id → InputUser
│ │ │ ├── InputUserEmpty
│ │ │ ├── InputUserSelf
│ │ │ ├── InputUser
│ │ │ └── InputUserFromMessage
│ │ ├── currency → string
│ │ └── amount → long
│ │ ├── users → Vector < InputUser >
│ │ │ ├── InputUserEmpty
│ │ │ ├── InputUserSelf
│ │ │ ├── InputUser
│ │ │ └── InputUserFromMessage
│ │ ├── boost_peer → InputPeer (optional)
│ │ │ ├── InputPeerEmpty
│ │ │ ├── InputPeerSelf
│ │ │ ├── InputPeerChat
│ │ │ ├── InputPeerUser
│ │ │ ├── InputPeerChannel
│ │ │ ├── InputPeerUserFromMessage
│ │ │ └── InputPeerChannelFromMessage
│ │ ├── currency → string
│ │ ├── amount → long
│ │ └── message → TextWithEntities (optional)
│ │ └── TextWithEntities
│ │ ├── 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
│ │ │ ├── InputPeerChannel
│ │ │ ├── InputPeerUserFromMessage
│ │ │ └── InputPeerChannelFromMessage
│ │ ├── 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
│ │ ├── InputPeerUserFromMessage
│ │ └── InputPeerChannelFromMessage
│ │ ├── 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
│ │ │ ├── InputPeerChannel
│ │ │ ├── InputPeerUserFromMessage
│ │ │ └── InputPeerChannelFromMessage
│ │ ├── 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
│ └── hash → string
│ ├── hide_name → true (optional)
│ ├── include_upgrade → true (optional)
│ ├── peer → InputPeer
│ │ ├── InputPeerEmpty
│ │ ├── InputPeerSelf
│ │ ├── InputPeerChat
│ │ ├── InputPeerUser
│ │ ├── InputPeerChannel
│ │ ├── InputPeerUserFromMessage
│ │ └── InputPeerChannelFromMessage
│ ├── gift_id → 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
│ ├── keep_original_details → true (optional)
│ └── stargift → InputSavedStarGift
│ │ └── msg_id → int
│ │ ├── peer → InputPeer
│ │ │ ├── InputPeerEmpty
│ │ │ ├── InputPeerSelf
│ │ │ ├── InputPeerChat
│ │ │ ├── InputPeerUser
│ │ │ ├── InputPeerChannel
│ │ │ ├── InputPeerUserFromMessage
│ │ │ └── InputPeerChannelFromMessage
│ │ └── saved_id → long
│ └── slug → string
│ ├── stargift → InputSavedStarGift
│ │ ├── InputSavedStarGiftUser
│ │ │ └── msg_id → int
│ │ ├── InputSavedStarGiftChat
│ │ │ ├── peer → InputPeer
│ │ │ │ ├── InputPeerEmpty
│ │ │ │ ├── InputPeerSelf
│ │ │ │ ├── InputPeerChat
│ │ │ │ ├── InputPeerUser
│ │ │ │ ├── InputPeerChannel
│ │ │ │ ├── InputPeerUserFromMessage
│ │ │ │ └── InputPeerChannelFromMessage
│ │ │ └── saved_id → long
│ │ └── InputSavedStarGiftSlug
│ │ └── slug → string
│ └── to_id → InputPeer
│ ├── InputPeerEmpty
│ ├── InputPeerSelf
│ ├── InputPeerChat
│ ├── InputPeerUser
│ ├── InputPeerChannel
│ ├── user_id → InputUser
│ │ ├── InputUserEmpty
│ │ ├── InputUserSelf
│ │ ├── InputUser
│ │ └── InputUserFromMessage
│ ├── months → int
│ └── message → TextWithEntities (optional)
│ └── TextWithEntities
│ ├── text → string
│ └── entities → Vector < MessageEntity >
│ ├── MessageEntityUnknown
│ ├── MessageEntityMention
│ ├── MessageEntityHashtag
│ ├── MessageEntityUrl
│ ├── MessageEntityEmail
│ ├── MessageEntityBold
│ ├── MessageEntityItalic
│ ├── MessageEntityCode
│ ├── MessageEntityPre
│ ├── MessageEntityTextUrl
│ ├── MessageEntityPhone
│ ├── MessageEntityCashtag
│ ├── MessageEntityStrike
│ ├── MessageEntityBankCard
│ ├── MessageEntitySpoiler
│ ├── bot → InputUser
│ │ ├── InputUserEmpty
│ │ ├── InputUserSelf
│ │ ├── InputUser
│ │ └── InputUserFromMessage
│ └── stars → long
│ ├── ton → true (optional)
│ ├── slug → string
│ └── to_id → InputPeer
│ ├── InputPeerEmpty
│ ├── InputPeerSelf
│ ├── InputPeerChat
│ ├── InputPeerUser
│ ├── InputPeerChannel
│ ├── peer → InputPeer
│ │ ├── InputPeerEmpty
│ │ ├── InputPeerSelf
│ │ ├── InputPeerChat
│ │ ├── InputPeerUser
│ │ ├── InputPeerChannel
│ │ ├── InputPeerUserFromMessage
│ │ └── InputPeerChannelFromMessage
│ └── hash → string
│ └── purpose → InputStorePaymentPurpose
│ │ ├── restore → true (optional)
│ │ └── upgrade → true (optional)
│ │ ├── user_id → InputUser
│ │ │ ├── InputUserEmpty
│ │ │ ├── InputUserSelf
│ │ │ ├── InputUser
│ │ │ └── InputUserFromMessage
│ │ ├── currency → string
│ │ └── amount → long
│ │ ├── users → Vector < InputUser >
│ │ │ ├── InputUserEmpty
│ │ │ ├── InputUserSelf
│ │ │ ├── InputUser
│ │ │ └── InputUserFromMessage
│ │ ├── boost_peer → InputPeer (optional)
│ │ │ ├── InputPeerEmpty
│ │ │ ├── InputPeerSelf
│ │ │ ├── InputPeerChat
│ │ │ ├── InputPeerUser
│ │ │ ├── InputPeerChannel
│ │ │ ├── InputPeerUserFromMessage
│ │ │ └── InputPeerChannelFromMessage
│ │ ├── currency → string
│ │ ├── amount → long
│ │ └── message → TextWithEntities (optional)
│ │ └── TextWithEntities
│ │ ├── 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
│ │ │ ├── InputPeerChannel
│ │ │ ├── InputPeerUserFromMessage
│ │ │ └── InputPeerChannelFromMessage
│ │ ├── 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
│ │ ├── InputPeerUserFromMessage
│ │ └── InputPeerChannelFromMessage
│ │ ├── 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
│ │ │ ├── InputPeerChannel
│ │ │ ├── InputPeerUserFromMessage
│ │ │ └── InputPeerChannelFromMessage
│ │ ├── 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
│ └── stargift → InputSavedStarGift
│ │ └── msg_id → int
│ │ ├── peer → InputPeer
│ │ │ ├── InputPeerEmpty
│ │ │ ├── InputPeerSelf
│ │ │ ├── InputPeerChat
│ │ │ ├── InputPeerUser
│ │ │ ├── InputPeerChannel
│ │ │ ├── InputPeerUserFromMessage
│ │ │ └── InputPeerChannelFromMessage
│ │ └── saved_id → long
│ └── slug → string
├── hide_name → true (optional)
├── update_bid → true (optional)
├── peer → InputPeer (optional)
│ ├── InputPeerEmpty
│ ├── InputPeerSelf
│ ├── InputPeerChat
│ ├── InputPeerUser
│ ├── InputPeerChannel
├── gift_id → long
├── bid_amount → long
└── message → TextWithEntities (optional)

Example