createInvoiceLink
Creates a Telegram invoice payment link from product details, prices, and a provider token so bots can collect payments and return a checkout link.
Instructions
Use this method to create a link for an invoice. Returns the created invoice link as String on success.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"title": "<title>",
"description": "<description>",
"payload": "<payload>",
"provider_token": "<provider_token>",
"currency": "<currency>",
"prices": "<prices>"
},
"name": "createInvoiceLink"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | Yes | Product name, 1-32 characters | |
| prices | Yes | Price breakdown, a list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.) | |
| payload | Yes | Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes. | |
| currency | Yes | Three-letter ISO 4217 currency code, see more on currencies | |
| 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. 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 | |
| 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 | 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. | |
| max_tip_amount | No | The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0 | |
| provider_token | Yes | Payment provider token, obtained via BotFather | |
| 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) if specified. | |
| need_shipping_address | No | Pass True if you require the user's shipping address to complete the order | |
| suggested_tip_amounts | No | An Array of suggested amounts of tips in the smallest units of the currency (integer, not float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed max_tip_amount. | |
| business_connection_id | No | Unique identifier of the business connection on behalf of which the link will be created | |
| 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 |