MadelineProtoDocs/old_docs/API_docs_v89/constructors/messageMediaInvoice.md
2019-12-27 17:48:04 +01:00

2.5 KiB

title description image
messageMediaInvoice Invoice https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png

Constructor: messageMediaInvoice

Back to constructors index

Invoice

Attributes:

Name Type Required Description
shipping_address_requested Bool Optional Whether the shipping address was requested
test Bool Optional Whether this is an example invoice
title string Yes Product name, 1-32 characters
description string Yes Product description, 1-255 characters
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 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
currency string Yes Three-letter ISO 4217 currency code
total_amount long Yes 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 string Yes Unique bot deep-linking parameter that can be used to generate this invoice

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'];

Or, if you're into Lua:

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'}