createInvoiceLink
Create a Telegram payment invoice link with product details, pricing, and currency, returning a ready-to-share URL for checkout.
Instructions
Create a link for an invoice. Returns the created invoice link as String on success.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | Yes | Product name, 1-32 characters | |
| prices | Yes | Price breakdown, a JSON-serialized list of components. | |
| 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. | |
| photo_url | No | URL of the product photo for the invoice. | |
| need_email | No | Pass True if you require the user's email address to complete the order. | |
| 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. | |
| photo_width | No | Photo width | |
| photo_height | No | Photo height | |
| 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. | |
| provider_token | No | Payment provider token, obtained via @BotFather. Pass an empty string for payments in Telegram Stars. | |
| need_phone_number | No | Pass True if you require the user's phone number to complete the order. | |
| subscription_period | No | The number of seconds the subscription will be active for before the next payment. The currency must be set to 'XTR' (Telegram Stars) if the parameter is used. Currently, it must always be 2592000 (30 days). | |
| need_shipping_address | No | Pass True if you require the user's shipping address to complete the order. | |
| suggested_tip_amounts | No | A JSON-serialized array of suggested amounts of tips in the smallest units of the currency. | |
| business_connection_id | No | Unique identifier of the business connection on behalf of which the link will be created. For payments in Telegram Stars only. | |
| send_email_to_provider | No | Pass True if the user's email address should be sent to the provider. | |
| send_phone_number_to_provider | No | Pass True if the user's phone number should be sent to the provider. |