MessageMediaInvoice

class pyrogram.raw.types.MessageMediaInvoice

Invoice

Constructor of MessageMedia.

Details:
  • Layer: 223

  • 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_requestedtrue (optional)
├── testtrue (optional)
├── titlestring
├── descriptionstring
├── photoWebDocument (optional)
│ ├── WebDocument
│ │ ├── urlstring
│ │ ├── access_hashlong
│ │ ├── sizeint
│ │ ├── mime_typestring
│ │ └── attributesVector < DocumentAttribute >
│ │ ├── DocumentAttributeImageSize
│ │ │ ├── wint
│ │ │ └── hint
│ │ ├── DocumentAttributeAnimated
│ │ ├── DocumentAttributeSticker
│ │ │ ├── masktrue (optional)
│ │ │ ├── altstring
│ │ │ ├── stickersetInputStickerSet
│ │ │ │ ├── InputStickerSetEmpty
│ │ │ │ ├── InputStickerSetID
│ │ │ │ ├── InputStickerSetShortName
│ │ │ │ ├── InputStickerSetAnimatedEmoji
│ │ │ │ ├── InputStickerSetDice
│ │ │ │ ├── InputStickerSetAnimatedEmojiAnimations
│ │ │ │ ├── InputStickerSetPremiumGifts
│ │ │ │ ├── InputStickerSetEmojiGenericAnimations
│ │ │ │ ├── InputStickerSetEmojiDefaultStatuses
│ │ │ │ ├── InputStickerSetEmojiDefaultTopicIcons
│ │ │ │ └── InputStickerSetTonGifts
│ │ │ └── mask_coordsMaskCoords (optional)
│ │ │ └── MaskCoords
│ │ ├── DocumentAttributeVideo
│ │ │ ├── round_messagetrue (optional)
│ │ │ ├── supports_streamingtrue (optional)
│ │ │ ├── nosoundtrue (optional)
│ │ │ ├── durationdouble
│ │ │ ├── wint
│ │ │ ├── hint
│ │ │ ├── preload_prefix_sizeint (optional)
│ │ │ ├── video_start_tsdouble (optional)
│ │ │ └── video_codecstring (optional)
│ │ ├── DocumentAttributeAudio
│ │ │ ├── voicetrue (optional)
│ │ │ ├── durationint
│ │ │ ├── titlestring (optional)
│ │ │ ├── performerstring (optional)
│ │ │ └── waveformbytes (optional)
│ │ ├── DocumentAttributeFilename
│ │ │ └── file_namestring
│ │ ├── freetrue (optional)
│ │ ├── text_colortrue (optional)
│ │ ├── altstring
│ │ └── stickersetInputStickerSet
│ │ ├── InputStickerSetEmpty
│ │ ├── InputStickerSetID
│ │ ├── InputStickerSetShortName
│ │ ├── InputStickerSetDice
│ │ ├── InputStickerSetPremiumGifts
│ │ └── InputStickerSetTonGifts
│ └── WebDocumentNoProxy
│ ├── urlstring
│ ├── sizeint
│ ├── mime_typestring
│ └── attributesVector < DocumentAttribute >
│ │ ├── wint
│ │ └── hint
│ │ ├── masktrue (optional)
│ │ ├── altstring
│ │ ├── stickersetInputStickerSet
│ │ │ ├── InputStickerSetEmpty
│ │ │ ├── InputStickerSetID
│ │ │ ├── InputStickerSetShortName
│ │ │ ├── InputStickerSetAnimatedEmoji
│ │ │ ├── InputStickerSetDice
│ │ │ ├── InputStickerSetPremiumGifts
│ │ │ └── InputStickerSetTonGifts
│ │ └── mask_coordsMaskCoords (optional)
│ │ └── MaskCoords
│ │ ├── round_messagetrue (optional)
│ │ ├── supports_streamingtrue (optional)
│ │ ├── nosoundtrue (optional)
│ │ ├── durationdouble
│ │ ├── wint
│ │ ├── hint
│ │ ├── preload_prefix_sizeint (optional)
│ │ ├── video_start_tsdouble (optional)
│ │ └── video_codecstring (optional)
│ │ ├── voicetrue (optional)
│ │ ├── durationint
│ │ ├── titlestring (optional)
│ │ ├── performerstring (optional)
│ │ └── waveformbytes (optional)
│ │ └── file_namestring
│ ├── freetrue (optional)
│ ├── text_colortrue (optional)
│ ├── altstring
│ └── stickersetInputStickerSet
│ ├── InputStickerSetEmpty
│ ├── InputStickerSetID
│ ├── InputStickerSetDice
├── receipt_msg_idint (optional)
├── currencystring
├── total_amountlong
├── start_paramstring
└── extended_mediaMessageExtendedMedia (optional)
│ ├── wint (optional)
│ ├── hint (optional)
│ ├── thumbPhotoSize (optional)
│ │ ├── PhotoSizeEmpty
│ │ │ └── typestring
│ │ ├── PhotoSize
│ │ │ ├── typestring
│ │ │ ├── wint
│ │ │ ├── hint
│ │ │ └── sizeint
│ │ ├── PhotoCachedSize
│ │ │ ├── typestring
│ │ │ ├── wint
│ │ │ ├── hint
│ │ │ └── bytesbytes
│ │ ├── PhotoStrippedSize
│ │ │ ├── typestring
│ │ │ └── bytesbytes
│ │ ├── PhotoSizeProgressive
│ │ │ ├── typestring
│ │ │ ├── wint
│ │ │ ├── hint
│ │ │ └── sizesVector < int >
│ │ └── PhotoPathSize
│ │ ├── typestring
│ │ └── bytesbytes
│ └── video_durationint (optional)
└── mediaMessageMedia
│ ├── spoilertrue (optional)
│ ├── photoPhoto (optional)
│ │ ├── PhotoEmpty
│ │ └── Photo
│ └── ttl_secondsint (optional)
├── MessageMediaGeo
│ └── geoGeoPoint
│ ├── GeoPointEmpty
│ └── GeoPoint
│ ├── phone_numberstring
│ ├── first_namestring
│ ├── last_namestring
│ ├── vcardstring
│ └── user_idlong
│ ├── nopremiumtrue (optional)
│ ├── spoilertrue (optional)
│ ├── videotrue (optional)
│ ├── roundtrue (optional)
│ ├── voicetrue (optional)
│ ├── documentDocument (optional)
│ │ ├── DocumentEmpty
│ │ └── Document
│ ├── alt_documentsVector < Document > (optional)
│ │ ├── DocumentEmpty
│ │ └── Document
│ ├── video_coverPhoto (optional)
│ │ ├── PhotoEmpty
│ │ └── Photo
│ ├── video_timestampint (optional)
│ └── ttl_secondsint (optional)
│ ├── force_large_mediatrue (optional)
│ ├── force_small_mediatrue (optional)
│ ├── manualtrue (optional)
│ ├── safetrue (optional)
│ └── webpageWebPage
│ ├── WebPageEmpty
│ ├── WebPagePending
│ ├── WebPage
│ └── WebPageNotModified
│ ├── geoGeoPoint
│ │ ├── GeoPointEmpty
│ │ └── GeoPoint
│ ├── titlestring
│ ├── addressstring
│ ├── providerstring
│ ├── venue_idstring
│ └── venue_typestring
│ └── gameGame
│ └── Game
│ ├── shipping_address_requestedtrue (optional)
│ ├── testtrue (optional)
│ ├── titlestring
│ ├── descriptionstring
│ ├── photoWebDocument (optional)
│ │ ├── WebDocument
│ │ └── WebDocumentNoProxy
│ ├── receipt_msg_idint (optional)
│ ├── currencystring
│ ├── total_amountlong
│ ├── start_paramstring
│ └── extended_mediaMessageExtendedMedia (optional)
│ └── MessageExtendedMedia
│ ├── geoGeoPoint
│ │ ├── GeoPointEmpty
│ │ └── GeoPoint
│ ├── headingint (optional)
│ ├── periodint
│ └── proximity_notification_radiusint (optional)
│ ├── pollPoll
│ │ └── Poll
│ └── resultsPollResults
│ └── PollResults
│ ├── valueint
│ ├── emoticonstring
│ └── game_outcomemessages.EmojiGameOutcome (optional)
│ ├── via_mentiontrue (optional)
│ ├── peerPeer
│ │ ├── PeerUser
│ │ ├── PeerChat
│ │ └── PeerChannel
│ ├── idint
│ └── storyStoryItem (optional)
│ ├── StoryItemDeleted
│ ├── StoryItemSkipped
│ └── StoryItem
│ ├── only_new_subscriberstrue (optional)
│ ├── winners_are_visibletrue (optional)
│ ├── channelsVector < long >
│ ├── countries_iso2Vector < string > (optional)
│ ├── prize_descriptionstring (optional)
│ ├── quantityint
│ ├── monthsint (optional)
│ ├── starslong (optional)
│ └── until_dateint
│ ├── only_new_subscriberstrue (optional)
│ ├── refundedtrue (optional)
│ ├── channel_idlong
│ ├── additional_peers_countint (optional)
│ ├── launch_msg_idint
│ ├── winners_countint
│ ├── unclaimed_countint
│ ├── winnersVector < long >
│ ├── monthsint (optional)
│ ├── starslong (optional)
│ ├── prize_descriptionstring (optional)
│ └── until_dateint
│ ├── stars_amountlong
│ └── extended_mediaVector < MessageExtendedMedia >
│ └── MessageExtendedMedia
│ ├── todoTodoList
│ │ └── TodoList
│ └── completionsVector < TodoCompletion > (optional)
│ └── TodoCompletion
├── rtmp_streamtrue (optional)
└── callInputGroupCall

Example

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