MadelineProtoDocs/old_docs/API_docs_v66/constructors/inputMediaInvoice.md

45 lines
1.8 KiB
Markdown
Raw Normal View History

2018-04-01 13:19:25 +02:00
---
title: inputMediaInvoice
2019-12-27 17:48:04 +01:00
description: Generated invoice of a [bot payment](https://core.telegram.org/bots/payments)
2018-04-04 19:52:48 +02:00
image: https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png
2018-04-01 13:19:25 +02:00
---
2018-04-05 01:19:57 +02:00
# Constructor: inputMediaInvoice
2018-04-01 13:19:25 +02:00
[Back to constructors index](index.md)
2019-12-27 17:48:04 +01:00
Generated invoice of a [bot payment](https://core.telegram.org/bots/payments)
2018-12-26 02:56:50 +01:00
2018-04-01 13:19:25 +02:00
### Attributes:
2018-12-26 02:56:50 +01:00
| Name | Type | Required | Description |
|----------|---------------|----------|-------------|
2019-12-27 17:48:04 +01:00
|title|[string](../types/string.md) | Yes|Product name, 1-32 characters|
|description|[string](../types/string.md) | Yes|Product description, 1-255 characters|
|photo|[InputWebDocument](../types/InputWebDocument.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.|
|invoice|[Invoice](../types/Invoice.md) | Yes|The actual invoice|
|payload|[bytes](../types/bytes.md) | Yes|Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.|
|provider|[string](../types/string.md) | Yes|Payments provider token, obtained via [Botfather](https://t.me/botfather)|
|start\_param|[string](../types/string.md) | Yes|Start parameter|
2018-04-01 13:19:25 +02:00
### Type: [InputMedia](../types/InputMedia.md)
### Example:
```php
2018-04-01 13:24:46 +02:00
$inputMediaInvoice = ['_' => 'inputMediaInvoice', 'title' => 'string', 'description' => 'string', 'photo' => InputWebDocument, 'invoice' => Invoice, 'payload' => 'bytes', 'provider' => 'string', 'start_param' => 'string'];
2018-04-01 13:19:25 +02:00
```
Or, if you're into Lua:
2018-04-01 13:19:25 +02:00
```lua
2018-04-01 13:24:46 +02:00
inputMediaInvoice={_='inputMediaInvoice', title='string', description='string', photo=InputWebDocument, invoice=Invoice, payload='bytes', provider='string', start_param='string'}
2018-04-01 13:19:25 +02:00
```