Link Search Menu Expand Document

Constructor: messageMediaInvoice

Back to constructors index

Invoice

Attributes:

NameTypeRequiredDescription
shipping_address_requestedBoolOptionalWhether the shipping address was requested
testBoolOptionalWhether this is an example invoice
titlestringYesProduct name, 1-32 characters
descriptionstringYesProduct description, 1-255 characters
photoWebDocumentOptionalURL 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_idintOptionalMessage 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
currencystringYesThree-letter ISO 4217 currency code
total_amountlongYesTotal 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_paramstringYesUnique bot deep-linking parameter that can be used to generate this invoice
extended_mediaMessageExtendedMediaOptionalExtended media

Type: MessageMedia

Example:

$messageMediaInvoice = ['_' => 'messageMediaInvoice', 'shipping_address_requested' => Bool, 'test' => Bool, 'title' => 'string', 'description' => 'string', 'photo' => WebDocument, 'receipt_msg_id' => int, 'currency' => 'string', 'total_amount' => long, 'start_param' => 'string', 'extended_media' => MessageExtendedMedia];