MadelineProtoDocs/old_docs/API_docs_v75/constructors/messageMediaInvoice.md

47 lines
2.5 KiB
Markdown
Raw Normal View History

2018-06-29 13:59:08 +02:00
---
title: messageMediaInvoice
2019-12-27 17:48:04 +01:00
description: Invoice
2018-06-29 13:59:08 +02:00
image: https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png
---
# Constructor: messageMediaInvoice
[Back to constructors index](index.md)
2019-12-27 17:48:04 +01:00
Invoice
2018-12-26 02:56:50 +01:00
2018-06-29 13:59:08 +02:00
### Attributes:
2018-12-26 02:56:50 +01:00
| Name | Type | Required | Description |
|----------|---------------|----------|-------------|
2019-12-27 17:48:04 +01:00
|shipping\_address\_requested|[Bool](../types/Bool.md) | Optional|Whether the shipping address was requested|
|test|[Bool](../types/Bool.md) | Optional|Whether this is an example invoice|
|title|[string](../types/string.md) | Yes|Product name, 1-32 characters|
|description|[string](../types/string.md) | Yes|Product description, 1-255 characters|
|photo|[WebDocument](../types/WebDocument.md) | 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](../types/int.md) | Optional|Message ID of receipt: if set, clients should change the text of the first [keyboardButtonBuy](../constructors/keyboardButtonBuy.md) button always attached to the [message](../constructors/message.md) to a localized version of the word `Receipt`|
|currency|[string](../types/string.md) | Yes|Three-letter ISO 4217 [currency](https://core.telegram.org/bots/payments#supported-currencies) code|
|total\_amount|[long](../types/long.md) | 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](https://core.telegram.org/bots/payments/currencies.json), it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).|
|start\_param|[string](../types/string.md) | Yes|Unique bot deep-linking parameter that can be used to generate this invoice|
2018-06-29 13:59:08 +02:00
### Type: [MessageMedia](../types/MessageMedia.md)
### Example:
```php
2018-06-29 13:59:08 +02:00
$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:
2018-06-29 13:59:08 +02:00
```lua
2018-06-29 13:59:08 +02:00
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'}
```