A customer picks a product in your bot, types "paid" and sends a screenshot. A manager opens the payment dashboard, hunts for the amount, matches the name and releases the order. During the day that costs a few minutes; at night the order sits until morning, and sooner or later a faked screenshot gets through. If you sell in Uzbekistan, Click and Payme are the obvious gateways, but connecting one is not the hard part. The hard part is making the order change status on its own, from a signal sent by the payment system. This guide covers the two ways to issue an invoice, a status model, the failures to plan for and a pre-launch checklist. It is written for whoever briefs the developer or signs off the finished bot, so no code is required.
The core rule: the server reports payment, not the customer
The flow has three parties: the bot, your server holding the orders, and the payment system. The bot only talks to the person. The payment system sees the money and tells your server directly, through a separate authenticated request. Only then does the server change the order status and the bot message the customer.
Everything else follows from this. An "I paid" message, a screenshot, a forwarded receipt or a verbal confirmation changes nothing. If an AI agent runs inside the bot, it must not have a "mark as paid" tool. It can read the status; only the handler receiving payment notifications can write it. Otherwise one persuasive line in chat could release an order with no money behind it. For where a button bot ends and an agent begins, see Telegram bot or AI agent.
Two ways to collect: in-chat invoice or payment link
The first is Telegram's built-in payments. You connect a payment provider through BotFather, receive a token, and the bot sends an invoice straight into the chat. Click is listed among the platform's providers; check the Payments section in BotFather to see whether the provider you need is available for your bot.
The second is a link. The bot shows a button, the customer goes to the Click or Payme payment page, pays and returns. This does not depend on Telegram, so the same link works in Instagram, email or SMS.
| Criterion | In-chat invoice | Payment link |
|---|---|---|
| Where the customer pays | Inside Telegram | On the payment system's page |
| Other channels | Telegram only | Anywhere you can send a link |
| Payment signal | Telegram sends the bot a successful payment event | The payment system calls your server |
| What you must build | The bot must approve the order quickly before the charge | A handler for the Click or Payme protocol |
| Best fit | Sales run mostly through Telegram | You need one ledger across several channels |
In-chat invoices come with a hard timer. Before charging, Telegram asks the bot whether the order can be accepted and waits up to 10 seconds; after that the transaction is cancelled. If a stock check goes through a slow accounting system, keep a fast copy of stock rather than querying it at the moment of payment.
Order statuses: the backbone of the flow
Create the order before issuing the invoice. It gets its own number, a fixed amount and a status. The number is passed to the payment system, and that is how the notification finds the order later. Six statuses make a workable minimum.
| Status | What happened | What the bot does | What stays with a person |
|---|---|---|---|
| Created | Contents and amount are fixed | Shows the total and a pay button | Nothing |
| Awaiting payment | Transaction created, goods reserved | Sends one reminder if the customer goes quiet | Nothing |
| Paid | Confirmation arrived from the payment system | Confirms and passes the order on | Picking, delivery, the service itself |
| Cancelled | Time ran out or the customer changed their mind | Releases the reservation, offers to reorder | Nothing |
| Cancelled after payment | Payment cancelled, order closed | Tells the customer the outcome | The refund decision and the refund |
| Needs review | Data did not match or the state is unclear | Says the order is being checked, calls an operator | Resolving the case |
Mirroring these statuses in your CRM helps the team. Our piece on amoCRM and AI agents covers what an agent may change on a card by itself.
How a payment runs through Click and Payme
With a link or the payment system's own app, both follow the same shape: first the system asks whether the payment can be accepted, then it reports that the payment went through.
Click
Click's documentation describes two mandatory requests to the supplier's billing system: Prepare and Complete. On the first, your server checks the order, the amount and the request signature; on the second, it records the result. If the signature fails, the server returns an error code instead of accepting the payment. Once both are implemented, your service can be paid through Click's payment interfaces, including its app.
Payme
With Payme's Merchant API, your server accepts six methods. The key ones are CheckPerformTransaction, CreateTransaction, PerformTransaction and CancelTransaction. Three details tend to surface during testing:
- Amounts are in tiyin. A tiyin is a hundredth of a som, so the price is multiplied by a hundred. A unit error produces an amount mismatch and the payment fails.
- Transactions expire. A created transaction lives for 12 hours, then is cancelled on timeout. Your reservation should end at the same point or sooner.
- Requests can repeat. If a transaction with that identifier already exists, the server checks it rather than opening a new one. A repeat call must not release the order twice.
Sample conversation
A hypothetical shop with an AI agent in the bot. Note the reply to the screenshot: the agent does not take the customer's word for it.
Customer: I'll take two boxes, delivery to Chilanzar.
Bot: Your order is ready: two boxes, delivery to Chilanzar. The total is shown below. Would you like to pay with Click or Payme?
Customer: Payme. Done, I've paid, here's the screenshot.
Bot: Thank you! There's no confirmation from Payme yet; it normally arrives right after the charge. I'll message you here as soon as it does. If the money has left your card and the status doesn't change, I'll bring in an operator.
Bot (after the Payme notification): Payment received and your order has gone to packing. I'll let you know when the courier sets off.
What breaks, and how to plan for it
| Situation | Correct behaviour |
|---|---|
| Customer taps "pay" twice | One active transaction per order; the repeat returns the existing one |
| Basket changed after the invoice | Old invoice cancelled, amount recalculated, new one issued |
| Amount does not match the order | Payment rejected, case logged |
| Money charged, notification lost | "Needs review" status, reconcile against the dashboard |
| Your server was down during payment | Reconcile transactions for the period; run this routinely |
| Customer closed the payment page | One reminder, then release the reservation |
| Customer asks for a refund | Agent collects the reason and hands over to a person |
Payme refunds have a catch: cancelling a completed transaction does not itself return the money. The refund is issued from the merchant dashboard and is only available if you have implemented CancelTransaction. If the order has been fully delivered, your server may decline the cancellation, so align this with how you handle refunds in practice.
Three checks before development starts
What you are selling. Built-in provider payments are meant for physical goods and services. Telegram has a separate rule for digital goods and services: payment inside the bot must go exclusively through Telegram Stars. The rules also say that having your own website with other payment systems is no exemption, and that attempting to sell otherwise can mean the bot is no longer shown to mobile users. If you sell courses, subscriptions or content access, read this first. The buyer journey for online schools is covered in selling courses on Telegram.
Receipts. A tax official's explanation published in 2021 treats payment through mobile apps like card payment: it does not remove the duty to issue an online cash register receipt, and for remote payments the receipt can be sent electronically. Payme offers a SetFiscalData method through which merchants receive fiscal receipt data, but whether it suits your setup depends on your connection terms. Confirm the current procedure with your accountant and the payment system.
The contract. Connection runs through an application and a contract with the payment system. Check requirements for your business form, fees and timelines with them directly, as these depend on the product and can change.
Pre-launch checklist
- The order has a number and a fixed amount before the invoice goes out.
- Only the payment notification handler can set "Paid".
- Every request's signature or authorisation is verified, and keys are not stored in the bot code.
- The amount is checked against the order on the server, never taken from a customer message.
- A repeat notification creates no second order and no second message.
- Tests cover success, cancellation, expiry, wrong amount and a double tap.
- Payments are reconciled against the dashboard daily.
- Someone is named to handle "Needs review" at night and at weekends.
- Receipt and refund procedures are agreed with your accountant.
More on connecting external systems is in our Integrations section. If the bot and accounting need linking to an agent, see how we work with AI agents or describe your process: the cost depends on scope and data, and the first conversation is there to work it out.
FAQ
Can one bot offer both Click and Payme?
Yes. The customer picks a method and the order stays the same. Just make sure each order has only one active payment attempt at a time, or double payment becomes possible.
Can an AI agent accept payment itself?
An agent can build the order, present the pay button, answer questions and read the status. Confirming the payment belongs to the server, based on the payment system's signal.
Do I need a server if the bot is built on a no-code platform?
You need a notification handler either way. Some platforms include one; others require adding it separately. Check which events the platform passes on and whether they can be tied to your order number.
What should we do with a payment screenshot?
Treat it as a reason to check, not as proof. Find the transaction by order number in the dashboard, then decide.
Does the bot store card details?
It should not. According to Telegram's documentation, payment providers handle that data and bots have no access to it. With a payment link, the customer enters it on the payment system's own page.