Layer 220
InputMediaInvoice
Generated invoice of a bot payment
constructor
inputMediaInvoice#405fef0d flags:# title:string description:string photo:flags.0?InputWebDocument invoice:Invoice payload:bytes provider:flags.3?string provider_data:DataJSON start_param:flags.1?string extended_media:flags.2?InputMedia = InputMedia;
Parameters
| Name | Type | Description |
|---|---|---|
| Flags | # | Flags, see TL conditional fields |
| Title | string | Product name, 1-32 characters |
| Description | string | Product description, 1-255 characters |
| Photo | flags.0?InputWebDocument | 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 | The actual invoice |
| Payload | bytes | Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes. |
| Provider | flags.3?string | Payments provider token, obtained via Botfather |
| ProviderData | DataJSON | JSON-encoded data about the invoice, which will be shared with the payment provider. A detailed description of required fields should be provided by the payment provider. |
| StartParam | flags.1?string | Unique bot deep links start parameter. If present, forwarded copies of the sent message will have a URL button with a deep link to the bot (instead of a Pay button), with the value used as the start parameter. If absent, forwarded copies of the sent message will have a Pay button, allowing multiple users to pay directly from the forwarded message, using the same invoice. |
| ExtendedMedia | flags.2?InputMedia | Deprecated |
Returns
InputMediaGogram Example
// Creating InputMediaInvoice constructor obj := &tg.InputMediaInvoice{ Title: "...", Description: "...", Invoice: &tg.Invoice{}, Payload: []byte{}, ProviderData: &tg.DataJson{}, // Optional fields: // Photo: &tg.InputWebDocument{}, // Provider: "...", // StartParam: "...", // ExtendedMedia: &tg.InputMediaPhoto{ID: &tg.InputPhoto{ID: int64(0), AccessHash: int64(0), FileReference: []byte{}}}, }