MessageMediaInvoice

class pyrogram.raw.types.MessageMediaInvoice

Invoice

Constructor of MessageMedia.

Details:
  • Layer: 227

  • ID: F6A548D3

Parameters:
  • title (str) – Product name, 1-32 characters

  • description (str) – Product description, 1-255 characters

  • currency (str) – Three-letter ISO 4217 currency code, or XTR for Telegram Stars.

  • total_amount (int 64-bit) – Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).

  • start_param (str) – Unique bot deep-linking parameter that can be used to generate this invoice

  • shipping_address_requested (bool, optional) – Whether the shipping address was requested

  • test (bool, optional) – Whether this is an example invoice

  • photo (WebDocument, optional) – URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service. People like it better when they see what they are paying for.

  • receipt_msg_id (int 32-bit, optional) – Message ID of receipt: if set, clients should change the text of the first keyboardButtonBuy button always attached to the message to a localized version of the word Receipt

  • extended_media (MessageExtendedMedia, optional) – Deprecated

Functions:

This object can be returned by 2 functions.

messages.UploadMedia

Upload a file and associate it to a chat (without actually sending it to the chat)

messages.UploadImportedMedia

Upload a media file associated with an imported chat, click here for more info ».

TL Schema

messageMediaInvoice#f6a548d3
flags:#
shipping_address_requested:flags.1?true
test:flags.3?true
title:string
description:string
photo:flags.0?WebDocument
receipt_msg_id:flags.2?int
currency:string
total_amount:long
start_param:string
extended_media:flags.4?MessageExtendedMedia

= MessageMedia

Parameter Tree

MessageMediaInvoice
├── shipping_address_requested → true (optional)
├── test → true (optional)
├── title → string
├── description → string
├── photo → WebDocument (optional)
│ ├── WebDocument
│ │ ├── url → string
│ │ ├── access_hash → long
│ │ ├── size → int
│ │ ├── mime_type → string
│ │ └── attributes → Vector < DocumentAttribute >
│ │ ├── DocumentAttributeImageSize
│ │ │ ├── w → int
│ │ │ └── h → int
│ │ ├── DocumentAttributeAnimated
│ │ ├── DocumentAttributeSticker
│ │ │ ├── mask → true (optional)
│ │ │ ├── alt → string
│ │ │ ├── stickerset → InputStickerSet
│ │ │ │ ├── InputStickerSetEmpty
│ │ │ │ ├── InputStickerSetID
│ │ │ │ ├── InputStickerSetShortName
│ │ │ │ ├── InputStickerSetAnimatedEmoji
│ │ │ │ ├── InputStickerSetDice
│ │ │ │ ├── InputStickerSetAnimatedEmojiAnimations
│ │ │ │ ├── InputStickerSetPremiumGifts
│ │ │ │ ├── InputStickerSetEmojiGenericAnimations
│ │ │ │ ├── InputStickerSetEmojiDefaultStatuses
│ │ │ │ ├── InputStickerSetEmojiDefaultTopicIcons
│ │ │ │ └── InputStickerSetTonGifts
│ │ │ └── mask_coords → MaskCoords (optional)
│ │ │ └── MaskCoords
│ │ ├── DocumentAttributeVideo
│ │ │ ├── round_message → true (optional)
│ │ │ ├── supports_streaming → true (optional)
│ │ │ ├── nosound → true (optional)
│ │ │ ├── duration → double
│ │ │ ├── w → int
│ │ │ ├── h → int
│ │ │ ├── preload_prefix_size → int (optional)
│ │ │ ├── video_start_ts → double (optional)
│ │ │ └── video_codec → string (optional)
│ │ ├── DocumentAttributeAudio
│ │ │ ├── voice → true (optional)
│ │ │ ├── duration → int
│ │ │ ├── title → string (optional)
│ │ │ ├── performer → string (optional)
│ │ │ └── waveform → bytes (optional)
│ │ ├── DocumentAttributeFilename
│ │ │ └── file_name → string
│ │ ├── free → true (optional)
│ │ ├── text_color → true (optional)
│ │ ├── alt → string
│ │ └── stickerset → InputStickerSet
│ │ ├── InputStickerSetEmpty
│ │ ├── InputStickerSetID
│ │ ├── InputStickerSetShortName
│ │ ├── InputStickerSetDice
│ │ ├── InputStickerSetPremiumGifts
│ │ └── InputStickerSetTonGifts
│ └── WebDocumentNoProxy
│ ├── url → string
│ ├── size → int
│ ├── mime_type → string
│ └── attributes → Vector < DocumentAttribute >
│ │ ├── w → int
│ │ └── h → int
│ │ ├── mask → true (optional)
│ │ ├── alt → string
│ │ ├── stickerset → InputStickerSet
│ │ │ ├── InputStickerSetEmpty
│ │ │ ├── InputStickerSetID
│ │ │ ├── InputStickerSetShortName
│ │ │ ├── InputStickerSetAnimatedEmoji
│ │ │ ├── InputStickerSetDice
│ │ │ ├── InputStickerSetPremiumGifts
│ │ │ └── InputStickerSetTonGifts
│ │ └── mask_coords → MaskCoords (optional)
│ │ └── MaskCoords
│ │ ├── round_message → true (optional)
│ │ ├── supports_streaming → true (optional)
│ │ ├── nosound → true (optional)
│ │ ├── duration → double
│ │ ├── w → int
│ │ ├── h → int
│ │ ├── preload_prefix_size → int (optional)
│ │ ├── video_start_ts → double (optional)
│ │ └── video_codec → string (optional)
│ │ ├── voice → true (optional)
│ │ ├── duration → int
│ │ ├── title → string (optional)
│ │ ├── performer → string (optional)
│ │ └── waveform → bytes (optional)
│ │ └── file_name → string
│ ├── free → true (optional)
│ ├── text_color → true (optional)
│ ├── alt → string
│ └── stickerset → InputStickerSet
│ ├── InputStickerSetEmpty
│ ├── InputStickerSetID
│ ├── InputStickerSetDice
├── receipt_msg_id → int (optional)
├── currency → string
├── total_amount → long
├── start_param → string
└── extended_media → MessageExtendedMedia (optional)
│ ├── w → int (optional)
│ ├── h → int (optional)
│ ├── thumb → PhotoSize (optional)
│ │ ├── PhotoSizeEmpty
│ │ │ └── type → string
│ │ ├── PhotoSize
│ │ │ ├── type → string
│ │ │ ├── w → int
│ │ │ ├── h → int
│ │ │ └── size → int
│ │ ├── PhotoCachedSize
│ │ │ ├── type → string
│ │ │ ├── w → int
│ │ │ ├── h → int
│ │ │ └── bytes → bytes
│ │ ├── PhotoStrippedSize
│ │ │ ├── type → string
│ │ │ └── bytes → bytes
│ │ ├── PhotoSizeProgressive
│ │ │ ├── type → string
│ │ │ ├── w → int
│ │ │ ├── h → int
│ │ │ └── sizes → Vector < int >
│ │ └── PhotoPathSize
│ │ ├── type → string
│ │ └── bytes → bytes
│ └── video_duration → int (optional)
└── media → MessageMedia
│ ├── spoiler → true (optional)
│ ├── live_photo → true (optional)
│ ├── photo → Photo (optional)
│ │ ├── PhotoEmpty
│ │ └── Photo
│ ├── ttl_seconds → int (optional)
│ └── video → Document (optional)
│ ├── DocumentEmpty
│ └── Document
├── MessageMediaGeo
│ └── geo → GeoPoint
│ ├── GeoPointEmpty
│ └── GeoPoint
│ ├── phone_number → string
│ ├── first_name → string
│ ├── last_name → string
│ ├── vcard → string
│ └── user_id → long
│ ├── nopremium → true (optional)
│ ├── spoiler → true (optional)
│ ├── video → true (optional)
│ ├── round → true (optional)
│ ├── voice → true (optional)
│ ├── document → Document (optional)
│ │ ├── DocumentEmpty
│ │ └── Document
│ ├── alt_documents → Vector < Document > (optional)
│ │ ├── DocumentEmpty
│ │ └── Document
│ ├── video_cover → Photo (optional)
│ │ ├── PhotoEmpty
│ │ └── Photo
│ ├── video_timestamp → int (optional)
│ └── ttl_seconds → int (optional)
│ ├── force_large_media → true (optional)
│ ├── force_small_media → true (optional)
│ ├── manual → true (optional)
│ ├── safe → true (optional)
│ └── webpage → WebPage
│ ├── WebPageEmpty
│ ├── WebPagePending
│ ├── WebPage
│ └── WebPageNotModified
│ ├── geo → GeoPoint
│ │ ├── GeoPointEmpty
│ │ └── GeoPoint
│ ├── title → string
│ ├── address → string
│ ├── provider → string
│ ├── venue_id → string
│ └── venue_type → string
│ └── game → Game
│ └── Game
│ ├── shipping_address_requested → true (optional)
│ ├── test → true (optional)
│ ├── title → string
│ ├── description → string
│ ├── photo → WebDocument (optional)
│ │ ├── WebDocument
│ │ └── WebDocumentNoProxy
│ ├── receipt_msg_id → int (optional)
│ ├── currency → string
│ ├── total_amount → long
│ ├── start_param → string
│ └── extended_media → MessageExtendedMedia (optional)
│ └── MessageExtendedMedia
│ ├── geo → GeoPoint
│ │ ├── GeoPointEmpty
│ │ └── GeoPoint
│ ├── heading → int (optional)
│ ├── period → int
│ └── proximity_notification_radius → int (optional)
│ ├── poll → Poll
│ │ └── Poll
│ ├── results → PollResults
│ │ └── PollResults
│ └── attached_media → MessageMedia (optional)
│ ├── MessageMediaEmpty
│ ├── MessageMediaPhoto
│ ├── MessageMediaGeo
│ ├── MessageMediaContact
│ ├── MessageMediaDocument
│ ├── MessageMediaWebPage
│ ├── MessageMediaVenue
│ ├── MessageMediaGame
│ ├── MessageMediaInvoice
│ ├── MessageMediaGeoLive
│ ├── MessageMediaPoll
│ ├── MessageMediaDice
│ ├── MessageMediaStory
│ ├── MessageMediaGiveaway
│ ├── MessageMediaPaidMedia
│ ├── MessageMediaToDo
│ ├── value → int
│ ├── emoticon → string
│ └── game_outcome → messages.EmojiGameOutcome (optional)
│ ├── via_mention → true (optional)
│ ├── peer → Peer
│ │ ├── PeerUser
│ │ ├── PeerChat
│ │ └── PeerChannel
│ ├── id → int
│ └── story → StoryItem (optional)
│ ├── StoryItemDeleted
│ ├── StoryItemSkipped
│ └── StoryItem
│ ├── only_new_subscribers → true (optional)
│ ├── winners_are_visible → true (optional)
│ ├── channels → Vector < long >
│ ├── countries_iso2 → Vector < string > (optional)
│ ├── prize_description → string (optional)
│ ├── quantity → int
│ ├── months → int (optional)
│ ├── stars → long (optional)
│ └── until_date → int
│ ├── only_new_subscribers → true (optional)
│ ├── refunded → true (optional)
│ ├── channel_id → long
│ ├── additional_peers_count → int (optional)
│ ├── launch_msg_id → int
│ ├── winners_count → int
│ ├── unclaimed_count → int
│ ├── winners → Vector < long >
│ ├── months → int (optional)
│ ├── stars → long (optional)
│ ├── prize_description → string (optional)
│ └── until_date → int
│ ├── stars_amount → long
│ └── extended_media → Vector < MessageExtendedMedia >
│ └── MessageExtendedMedia
│ ├── todo → TodoList
│ │ └── TodoList
│ └── completions → Vector < TodoCompletion > (optional)
│ └── TodoCompletion
├── rtmp_stream → true (optional)
└── call → InputGroupCall

Example

MessageMediaInvoice(
    title="text",
    description="text",
    currency="text",
    total_amount=0,
    start_param="text",
)