sendInvoice
Send payment invoices to Telegram users with product title, description, currency, and price breakdown, enabling direct in-chat payments.
Instructions
Send an invoice to a user. On success, the sent Message is returned.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | Yes | Product name, 1-32 characters | |
| prices | Yes | Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, etc.) | |
| chat_id | Yes | Unique identifier for the target chat or username of the target channel (in the format @channelusername) | |
| payload | Yes | Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes. | |
| currency | Yes | Three-letter ISO 4217 currency code, or "XTR" for payments in Telegram Stars | |
| need_name | No | Pass True if you require the user's full name to complete the order. Ignored for payments in Telegram Stars. | |
| photo_url | No | URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service. | |
| need_email | No | Pass True if you require the user's email address to complete the order. Ignored for payments in Telegram Stars. | |
| photo_size | No | Photo size in bytes | |
| description | Yes | Product description, 1-255 characters | |
| is_flexible | No | Pass True if the final price depends on the shipping method. Ignored for payments in Telegram Stars. | |
| photo_width | No | Photo width | |
| photo_height | No | Photo height | |
| reply_markup | No | A JSON-serialized object for an inline keyboard. If empty, one 'Pay total price' button will be shown. | |
| provider_data | No | JSON-serialized data about the invoice, which will be shared with the payment provider. | |
| max_tip_amount | No | The maximum accepted amount for tips in the smallest units of the currency. Defaults to 0. | |
| provider_token | No | Payment provider token, obtained via @BotFather. Pass an empty string for payments in Telegram Stars. | |
| protect_content | No | Protects the contents of the sent message from forwarding and saving. | |
| start_parameter | No | Unique deep-linking parameter. If left empty, forwarded copies of the sent message will have a Pay button. | |
| reply_parameters | No | Description of the message to reply to. | |
| message_effect_id | No | Unique identifier of the message effect to be added to the message; for private chats only. | |
| message_thread_id | No | Unique identifier for the target message thread (topic) of the forum; for forum supergroups only | |
| need_phone_number | No | Pass True if you require the user's phone number to complete the order. Ignored for payments in Telegram Stars. | |
| allow_paid_broadcast | No | Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. | |
| disable_notification | No | Sends the message silently. Users will receive a notification with no sound. | |
| need_shipping_address | No | Pass True if you require the user's shipping address to complete the order. Ignored for payments in Telegram Stars. | |
| suggested_tip_amounts | No | A JSON-serialized array of suggested amounts of tips in the smallest units of the currency. At most 4 suggested tip amounts can be specified. | |
| send_email_to_provider | No | Pass True if the user's email address should be sent to the provider. Ignored for payments in Telegram Stars. | |
| send_phone_number_to_provider | No | Pass True if the user's phone number should be sent to the provider. Ignored for payments in Telegram Stars. |