You can accept payments from Telegram users via Telegram Bots.
Note: This article is intended for bot developers. If you're looking for a general overview of Telegram Payments, check out the Telegram blog.
From the user's perspective the payments system is completely seamless. Merchant bots can send specially formatted invoice messages to users. Such invoice messages feature a photo and description of the product along with a prominent Pay button. Tapping this button opens a special payment interface in the Telegram app. In this interface, users are prompted for additional details like shipping info, phone number, or email address.
Once they've entered all the necessary info, it is forwarded to the merchant bot. The bot can offer several shipping options for physical goods based on the address. When ready, users can enter their credit card info or choose one of their saved cards — and pay for the product. Telegram also supports Apple Pay and Android Pay. Once the transaction is done, the merchant bot sends a receipt message that contains payment details along with shipping and delivery information.
Telegram does not process payments from users and instead relies on different payment providers around the world. It is the payment providers that handle and store all sensitive information, like credit card details. Neither Telegram nor the bot developers have access to it. For the moment we support payments from more than 200 countries via the the following payment providers:
More providers are coming.
Telegram does not charge any commission for using the Payments API. Note though, that most payment providers will have their own commissions. For example, Stripe in the US charges 2.9% + 30¢ per successful card charge (see the Stripe website for more details on pricing).
Telegram does not impose any limits on what products or services your bot can offer. But please note that you must comply with the rules of the payments provider you choose in our system. E.g., Stripe has a special page for prohibited businesses – you may want to consult that one before you start selling harvested organs.
Special Note: Due to Apple's limitations, bot developers are currently not allowed to accept payments for digital goods and virtual services from iOS users.
Telegram acts as a messenger between the paying user, the bot developer, and their chosen payment system. The user sends their credit card details directly to the payment system. Then the payment system's response and the shipping details entered by the user are passed to the bot developer so that they can process the order.
Since Telegram doesn‘t process the payments, we don’t store and can‘t access any sensitive data. Due to this structure, it is impossible for Telegram to handle complaints or cashbacks – any disputed payments are the responsibility of the bot developers, payment providers, and banks that participated in the exchange.
Now let‘s look at payments via Telegram’s Bot API in more detail. To start accepting payments, you need a Telegram bot, obviously. Have a chat with BotFather to create a bot if you haven't got one already.
Now you have a merchant bot that wants to offer goods or services to Telegram users. Let's call it
@merchantbot in this document. First stop is to choose and connect a payment provider. At the moment, you can use Stripe for bot payments. We will be connecting more providers in the coming months, so watch out for announcements on the @BotNews channel.
/mybots command in the chat with BotFather and choose the
@merchantbot that will be offering goods or services. Go to Bot Settings > Payments. Choose a provider, and you will be redirected to the relevant bot. Enter the required details so that the payments provider is connected successfully, go back to the chat with Botfather. The message will now show available providers. Each will have a name, a token, and the date the provider was connected. You will use the token when working with the Bot API.
While you‘re still developing and testing payments for your bot, use the “Stripe TEST MODE” provider. When in this mode, you can make payments without actually billing any accounts. Real cards can’t be used in test mode, but you can use test cards like
4242 4242 4242 4242 (full list here). You can switch between test mode and live mode as many times as you want, but please see the live checklist before you go live.
Please note that when your merchant bot is working in test mode, it will only be able to send invoices to those Telegram users that are mutual contacts with the account of the bot's creator. So make sure that those who will help you test the payments functionality are in your contacts list.
The user contacts
@merchantbot and requests to purchase something. The bot forms an invoice message with a description of the goods or service, amount to be paid, as well as requested shipping info.
Use the sendInvoice method to do this. The provider_token parameter is where you put the token value that you've obtained earlier via Botfather. It is possible for one merchant bot to use several different tokens for different users or different goods and services.
An invoice message with a pay button can only be sent to a private chat with the user. Groups and channels are not supported. The resulting invoice message will look like this:
The user specifies shipping information or other info requested by the bot. This could be the user's full name, an email address, a phone number in international format, or a full postal address for delivery.
If a shipping address was requested and you included the parameter is_flexible, the Bot API will send an Update with a shipping_query field to the bot. The bot must respond using answerShippingQuery either with a list of possible delivery options and the relevant delivery prices, or with an error (for example, if delivery to the specified address is not possible).
The user selects a delivery option from the list (the overall amount to be paid may change at this point) and proceeds to checkout.
The user enters their payment information and presses the final pay button. At this moment the Bot API sends an Update with the field pre_checkout_query to the bot that contains all the available information about the order. Your bot must reply using answerPrecheckoutQuery within 10 seconds after receiving this update or the transaction is canceled.
The bot may return an error if it can‘t process the order for any reason. We highly recommend specifying a reason for failure to complete the order in human readable form (e.g. "Sorry, we’re all out of rubber ducks! Would you be interested in a steel bear instead?"). Telegram will display this reason to the user.
In case the bot confirms the order, Telegram requests the payment provider to complete the transaction. If the payment information was entered correctly and the payment goes through, the API will send a receipt message of the type successful_payment from the user. Once your bot receives this message, it should proceed with delivering the goods or services purchased by the user.
For the user, the Invoice message in the UI becomes a Receipt — they can open this receipt at any time and see all the details of the transaction:
Going Viral: Deep Linking
Note the arrow button on the right of the receipt message on the screenshot above. This quick forwarding button allows the user to select multiple friends, groups, or channels and send the message to them immediately. Thanks to this button, your goods and services can spread virally — the resulting message will have a button that leads users to your bot and asks it to create a similar invoice.
For the quick forwarding button to work correctly, all your invoice messages must contain a start_parameter for creating a new invoice. More info on Deep Linking »
Once you‘ve tested everything and confirmed that your payments implementation works, you’re ready to switch to LIVE MODE. To do this, go to BotFather > /mybots > select
@merchantbot > Bot Settings / Payments and enable Stripe LIVE MODE. You will get a token that has the string
:LIVE: in the middle, e.g.
123:LIVE:XXXX. Do not give this token to any third parties!
Before your merchant bot goes into live mode, please ensure the following:
Telegram payments currently support the currencies listed below (here's a JSON version in case you need it).
If you're using Stripe as the payments provider, supported currencies may vary depending on the country you have specified in your Stripe account (more info).
The minimum and maximum amounts for each of the currencies roughly correspond to the limit of
US$ 1-10000. The amount must be expressed in 8 digits or less, so the maximum value will be correspondingly lower for some lower-value currencies like the Serbian dinar. Note that for each currency except USD these limits depend on exchange rates and may change over time (plan ahead for this when you implement limits in your code).
|Code||Title||Min amount||Max amount|
|AED||United Arab Emirates Dirham||AED 3.67||AED 36,732.50|
|AMD||Armenian Dram||476.82 AMD||4,768,249.95 AMD|
|ARS||Argentine Peso||ARS 42,78||ARS 427.889,94|
|AZN||Azerbaijani Manat||1,70 AZN||17 049,71 AZN|
|BAM||Bosnia & Herzegovina Convertible Mark||1,71 BAM||17.162,99 BAM|
|BDT||Bangladeshi Taka||BDT 84.46||BDT 844,625.00|
|BGN||Bulgarian Lev||1,71 BGN||17 168,50 BGN|
|BOB||Bolivian Boliviano||BOB 6,91||BOB 69.126,99|
|BRL||Brazilian Real||R$ 3,82||R$ 38.220,50|
|CHF||Swiss Franc||0.97 CHF||9'747.70 CHF|
|CLP||Chilean Peso||CLP 682||CLP 6.828.098|
|CNY||Chinese Renminbi Yuan||CN¥6.87||CN¥68,786.03|
|COP||Colombian Peso||COP 3.202,40||COP 32.024.000,00|
|CRC||Costa Rican Colón||CRC584,67||CRC5.846.750,24|
|CZK||Czech Koruna||22,46 CZK||224 697,03 CZK|
|DKK||Danish Krone||6,55 DKK||65530,10 DKK|
|DZD||Algerian Dinar||DZD 118.69||DZD 1,186,901.74|
|EGP||Egyptian Pound||EGP 16.71||EGP 167,189.06|
|EUR||Euro||0,87 €||8 776,20 €|
|GEL||Georgian Lari||2,77 GEL||27 702,46 GEL|
|HKD||Hong Kong Dollar||HK$7.81||HK$78,117.50|
|HNL||Honduran Lempira||HNL 24.47||HNL 244,735.02|
|HRK||Croatian Kuna||6,49 HRK||64.931,02 HRK|
|HUF||Hungarian Forint||284,40 HUF||2 844 039,68 HUF|
|ILS||Israeli New Sheqel||₪ 3.60||₪ 36,032.02|
|ISK||Icelandic Króna||124 ISK||1.241.958 ISK|
|KGS||Kyrgyzstani Som||69-64 KGS||696 444-98 KGS|
|KRW||South Korean Won||₩1,156||₩11,563,501|
|KZT||Kazakhstani Tenge||KZT378-53||KZT3 785 300-42|
|LBP||Lebanese Pound||LBP 1,511.70||LBP 15,117,013.24|
|LKR||Sri Lankan Rupee||LKR 176.51||LKR 1,765,199.74|
|MAD||Moroccan Dirham||MAD 9.51||MAD 95,134.05|
|MDL||Moldovan Leu||18.16 MDL||181,659.86 MDL|
|MNT||Mongolian Tögrög||MNT2 661,14||MNT26 611 404,68|
|MVR||Maldivian Rufiyaa||15.49 MVR||154,908.66 MVR|
|NIO||Nicaraguan Córdoba||NIO 32.94||NIO 329,490.61|
|NOK||Norwegian Krone||NOK 8,47||NOK 84 715,95|
|NZD||New Zealand Dollar||NZ$1.51||NZ$15,125.15|
|PAB||Panamanian Balboa||PAB 0.99||PAB 9,996.50|
|PEN||Peruvian Nuevo Sol||PEN 3.30||PEN 33,041.50|
|PLN||Polish Złoty||3,73 PLN||37 334,50 PLN|
|PYG||Paraguayan Guaraní||PYG 6.197||PYG 61.977.011|
|QAR||Qatari Riyal||QAR 3.64||QAR 36,409.94|
|RON||Romanian Leu||4,14 RON||41.414,95 RON|
|RSD||Serbian Dinar||103,43 RSD||1.034.396,39 RSD|
|RUB||Russian Ruble||62,91 RUB||629 149,79 RUB|
|SAR||Saudi Riyal||SAR 3.75||SAR 37,502.99|
|SEK||Swedish Krona||9,30 SEK||93.053,10 SEK|
|TJS||Tajikistani Somoni||9;42 TJS||94 264;00 TJS|
|TRY||Turkish Lira||5,79 TRY||57.902,85 TRY|
|TTD||Trinidad and Tobago Dollar||TTD6.76||TTD67,689.50|
|TWD||New Taiwan Dollar||NT$30.98||NT$309,819.60|
|UAH||Ukrainian Hryvnia||26,18UAH||261 824,99UAH|
|USD||United States Dollar||$1.00||$10,000.00|
|UYU||Uruguayan Peso||UYU 35,22||UYU 352.225,00|
|UZS||Uzbekistani Som||8 543,50 UZS||85 435 005,83 UZS|
|VND||Vietnamese Đồng||23.290 ₫||232.909.000 ₫|
|YER||Yemeni Rial||YER 250.35||YER 2,503,501.04|
|ZAR||South African Rand||ZAR 14.33||ZAR 143,382.50|