Skip to content
TGWAY
Channels & Bots

How to Accept Payments in a Telegram Bot

A bot can take money, and the buyer never leaves the conversation: a payment sheet appears over the chat, they confirm, and your bot is told it went…

  • LevelL3
In this article
  1. rule Two rails, and the rule that assigns them
  2. receipt_long Three steps, and everybody skips the middle one
  3. shopping_cart What the buyer sees, and why it converts
  4. touch_app Try it now — five minutes
  5. balance Refunds, settlement, and the parts that are yours
  6. storefront What actually sells well in a conversation
  7. help Common questions at this stage
  8. At a glance
school Telegram Masterclass • Step 094 / 100 Step 094: How to Accept Payments in a Telegram Bot
Step 094 of 100

A bot can take money, and the buyer never leaves the conversation: a payment sheet appears over the chat, they confirm, and your bot is told it went through. From the customer's side this is the smoothest checkout available anywhere, which is most of why it is worth doing.

There are two rails, and which one you use is not a preference. Digital things go one way and physical things go the other, for reasons that have nothing to do with Telegram and everything to do with the shop your customer installed the application from.

What you will be able to do after this step

  • check_circle Say which rail your product has to use, and why it is not your call.
  • check_circle Handle the confirmation step that exists to stop you selling what you do not have.
  • check_circle Deliver exactly once, even when told about a payment twice.
  • check_circle Write a refund policy before the first refund request.

rule Two rails, and the rule that assigns them

Anything digital — access to a channel, a file, a subscription, an unlock inside a game — goes through the platform's own in-app currency, the Stars from Step 077. Anything physical, or a real-world service you perform, goes through a card processor you connect yourself.

The dividing line is not Telegram's invention. Mobile application stores require that digital goods sold inside an application go through their purchase mechanism, and the in-app currency is the arrangement that satisfies that. Routing a digital product through the card rail is not a clever way to avoid a fee. It is a rule breach, and the consequence lands on your bot rather than on your accountant.

Route What it is for Where the money goes What you still have to handle
In-app currency Digital goods and access: files, subscriptions, unlocks, tips. A balance on your account, withdrawn later through the platform's own process. Delivery, refunds within narrower limits, and the fact that a balance is not yet money.
A card processor Physical goods and real-world services. Your merchant account, on your processor's normal schedule. Everything a merchant handles: disputes, chargebacks, shipping, and the processor's own rules.
A link to your own checkout Anything, technically — and it is usually the wrong answer. Wherever your website sends it. The customer has left the conversation, which costs conversions, and the digital-goods rule still applies to you.
No payment in the bot Invoicing, bank transfer, paying somebody in person. Wherever you normally get paid. Reconciling by hand — which is entirely reasonable at low volume and awful at high.

The fourth row is worth taking seriously for a small operation. A bot that collects an order and a contact, and a human who sends an invoice, has none of the complexity below and works fine until it does not.

receipt_long Three steps, and everybody skips the middle one

The flow has a shape worth understanding regardless of language or library.

First, you send an invoice. A title, a description, a price, and — this is the part that matters later — a reference of your own attached to it, such as your order number. That reference comes back to you at the end, and it is how a payment finds the thing it paid for. Without it you get a confirmation with nothing to match it against.

Second, the buyer presses pay and you get a moment to object. This step exists because time has passed since the invoice: the last item may have sold, the discount code may have expired, the price may have changed. You are being asked "is this still valid?", and the window is short. Check quickly and say yes or no — and do not put slow work here, because a slow answer is a failed payment for a customer who was ready to buy.

Third, you are told the payment succeeded, and you deliver. Two disciplines apply, both from Step 093. Deliver on this event, not when the invoice was sent. And make delivery safe to run twice, keyed to your own reference, because being told twice is a normal occurrence and a customer who receives two subscriptions or an unlock that charged twice will remember it.

fact_check
Keep your own record of the order Do not treat the payment system as your database. You want a row of your own created when the invoice is sent, updated when the payment confirms, and readable when somebody writes in three weeks later asking what they bought. Reconciling a support question from a payment provider's dashboard, with no order of your own to point at, is where small shops discover they built a checkout and not a business.

shopping_cart What the buyer sees, and why it converts

The payment sheet is drawn by Telegram, over your bot, and the buyer recognises it. They do not type a card number into your message thread, they are not sent to a browser, and they are not asked to create an account. That is the entire advantage, and it is a large one.

It also sets a rule you should be loud about with your own customers: a legitimate purchase in a bot happens in that sheet. Any bot asking for card details, a wallet phrase or a login code in the conversation itself is doing something else, and the same sentence from Step 088 applies without modification. Your users are being taught this by every scam they encounter, so a checkout that looks like the scam converts badly no matter how honest you are.

Two smaller things that decide whether people finish. Say the total before they press anything, including anything added later — a surprise at the sheet is where people stop. And state what happens after payment, in the invoice description, because a buyer who does not know whether to wait in the chat or check their email assumes something went wrong.

touch_app Try it now — five minutes

Four steps, and the third is the one that will happen to you in the first week.

  1. Decide which rail your product is on Digital or physical. If you are trying to argue that a digital thing is a service, you already know the answer.
  2. Buy something from your own bot Once, for a trivial amount, as a real customer. It is the only way to see what the sheet actually says.
  3. Deliver the same confirmation twice on purpose If the customer ends up with two of something, your delivery is not keyed to your own order reference, and it should be.
  4. Write the refund policy into the invoice description Two sentences. It resolves most disputes before they become messages.

balance Refunds, settlement, and the parts that are yours

Three things are frequently discovered after the first hundred sales rather than before.

Refunds are a decision, not a mechanism. Both rails can return money, and neither of them decides whether you should. Write the policy first, put it where a buyer reads it before paying, and make it generous enough that you can apply it without thinking — the time spent arbitrating individual cases is almost always worth more than the sums involved. Note that the in-app rail has narrower routes than a card, so a policy that promises more than the rail supports will make you the one issuing it manually.

The money arrives later than the sale. Card processors settle on their own schedule; the in-app balance has a process of its own before it becomes withdrawable. Neither is instant, both are predictable, and a plan that assumes same-day cash is a plan with a gap in it.

The paperwork is yours. The platform handles a transaction; it does not handle your invoicing, your tax position or your obligations to a customer. Whatever applies where you live applies to money that arrived this way, and finding that out in the first month is considerably cheaper than finding it out in the eleventh.

storefront What actually sells well in a conversation

The checkout is excellent and it is not the right container for everything. Two lists, and the second one is where people lose money.

It suits small, immediate, single decisions. A ticket, an unlock, one file, a top-up, a tip, access to something starting now. The buyer already knows what they want, the price fits in a sentence, and nothing has to be compared against anything.

It does not suit anything requiring a choice. A catalogue with sizes, colours and options is a website; reproducing it as a sequence of chat messages produces a shopping experience nobody enjoys and an abandonment rate to match. Nor does it suit anything with real delivery logistics, or anything expensive enough that the buyer wants a quotation, an invoice and a trail before committing.

And one honest caution about the frictionlessness itself. A purchase made in two taps is regretted in two taps. Impulse buying in a chat produces a noticeably higher rate of second thoughts than a checkout that made somebody stop and read, which shows up as refund requests rather than as revenue. The response is not to add friction — it is to describe precisely what is being bought, so that the thing arriving is the thing expected.

help Common questions at this stage

Can I sell a channel subscription through my own bot?

You can, and it is digital access, so it belongs on the in-app rail. Before building it, read Step 078: the hard part of a subscription is never the payment, it is the renewal and the removal, and the platform's own subscription mechanism already handles both. Building your own is worth it when you need something the built-in route cannot do, and a great deal of work when you do not.

My pre-checkout answer sometimes times out. What do I do?

Move work out of that step. It should read one row and answer; anything involving an external service, a slow query or a lock is the cause. If you genuinely must check something slow, check it when the invoice is created and hold a short reservation, so that the confirmation step is only looking at whether that reservation is still valid. A customer whose payment fails at the last moment rarely tries again.

How do I know a payment message is genuine?

Because it arrives as an update through the same channel as everything else your bot receives, with the integrity that implies — provided you verified the delivery as Step 091 describes. What you must not do is trust anything a user sends you that claims to be a receipt: a screenshot, a forwarded confirmation, a transaction reference typed into the chat. Those are not evidence of anything, and treating them as such is a well-worn way to give away your product.

Can I offer a discount code?

Yes, by building it yourself: the code is applied before the invoice is created, so what you send is simply an invoice for the discounted amount. Two things to get right — check the code again at the confirmation step, because an expired code between invoice and payment is exactly what that step is for, and record which code was used against your own order, because otherwise a campaign's results are unknowable.

What happens if my bot is down when someone pays?

The payment can still complete while your delivery does not, which is the worst combination and the reason for keeping your own order records. When the bot returns, the update may or may not still be waiting (Step 091), so the reliable recovery is a reconciliation you can run: list your own orders that were paid and not delivered, and deliver them. Building that job early is far easier than building it during the incident.

Do I need a company to accept payments?

For the card rail, you need whatever your chosen processor requires, which generally means an account in a name with a verifiable identity and a bank account, and the requirements differ by country. For the in-app rail, the barrier is lower because you are receiving a platform balance rather than card payments. Neither changes your obligations for declaring income, and neither is a reason to choose a rail — the product decides that, as the first section explains.

Summary

At a glance

How to Accept Payments in a Telegram Bot — at a glance illustration
  1. 1The right rail

    Digital goods use Stars; physical goods use a card provider.

  2. 2Pre-checkout

    Confirm stock and price quickly before the payment goes through.

  3. 3Deliver once

    Key delivery to your own order ID so a repeat does not double it.

Share this guide

Send it to a friend who has the same question.

Telegram WhatsApp
More

Open on your phonePoint your phone camera here to open this guide.

Updated

Related articles

View all ›