UFLEX
Telegram
All articles

Payment in a Telegram Bot: How to Accept Online Payments

A customer places an order in the bot, and then the back-and-forth starts: "send me the card number", "send a screenshot of the receipt". The operator checks each transfer by hand in the banking app and sometimes falls for a fake screenshot. Properly set up payment in a Telegram bot automates this process: the customer pays in a couple of taps, and the bot itself confirms that the money has really arrived. This article covers the main ways to accept payments, how they differ, what to prepare before connecting and which mistakes come up most often.

Ways to accept payments in a Telegram bot

A payment window inside the bot

Telegram gives bots its own payment interface: the bot sends the customer an invoice, the customer taps "Pay" and enters card details in the payment provider's window. The card data goes not to the bot but to the payment system, and the bot receives only the result of the payment. Some of the payment systems operating in Uzbekistan offer this kind of connection; check the exact capabilities and terms with them directly.

A link to a payment page

The bot generates a payment link for the order, and the customer pays on the page or in the app of the payment system. The payment system sends your server a notification of successful payment, and the bot sends the customer a confirmation. This is a flexible option: the same payment logic can be used for a website, a bot and a mobile app.

Payment inside a Mini App

If the bot has a Mini App, the cart and payment are on one screen: the customer picks products, specifies delivery and pays immediately. For stores with a large catalog this is a convenient scenario.

Card transfer and a screenshot

Many small companies start here, because no connection is required. But the drawbacks are serious: every payment has to be checked by hand, sending a fake or old screenshot is easy, as orders grow the operator can't keep up, and bookkeeping turns into a mess.

Comparing payment methods

Criterion Card transfer and screenshot Payment window in the bot Payment link
Connection Not required Contract with a payment system Contract with a payment system
Payment confirmation Manual Automatic Automatic
Risk of a fake receipt High None None
Convenience for the customer Medium Without leaving Telegram Going to a page or an app
Shared logic with website and app No Partly Yes
Reporting Collected by hand Automatic Automatic

Which method to choose

  • Few orders, the business is just starting. A card transfer is acceptable as a temporary solution, but assign the checking to one responsible employee and match every receipt against the incoming payment in the banking app.
  • Most sales happen in Telegram. A payment window inside the bot doesn't take the customer elsewhere and helps complete the purchase faster.
  • Website, app and bot work together. A payment link lets you use one payment logic in all channels.
  • Large catalog and a complex cart. Payment inside a Mini App gives the customer the most convenient scenario.

How payment in a bot works, step by step

  1. The customer builds a cart and confirms the order.
  2. The server calculates the amount itself: prices are taken from the database, not from data that came from the customer.
  3. The server creates a payment in the payment system, and the bot sends the customer a button or a payment link.
  4. The customer pays by card.
  5. The payment system notifies the server of the result, and the server verifies that the notification is genuine.
  6. The order moves to the "paid" status, the customer gets a confirmation, and staff get a paid order.
  7. The data is passed to the CRM, warehouse or cash register software.

The main rule: the bot should trust neither the customer's message "I paid" nor a screenshot, but only the confirmation from the payment system. That is why, when integrating with a payment system, special attention goes to server-side verification.

What to prepare before connecting

  • The legal form of the business. Payment systems usually sign a contract with a legal entity or an individual entrepreneur. Check the list of documents with your chosen system.
  • A settlement account. Decide in advance which account the money will go to.
  • A public offer, delivery and return rules. The customer must see the terms before paying.
  • A fiscal receipt. Check the current requirements for issuing receipts on online payments against official sources, and find out whether your cash register software is ready for it.
  • The type of product. For physical goods, services and digital products, the rules of Telegram and the payment systems may differ.
  • Test mode. All scenarios must be checked in a test environment before working with real money.

Common mistakes when connecting payment

  • The amount is taken from the customer's side. If the price is passed straight from a button or the Mini App, it can be tampered with and the customer can pay less.
  • A repeated notification is counted twice. The payment system may send the same notification again, and the server must recognize the duplicate.
  • The money arrived but there is no order. If the server is temporarily unavailable, a mechanism for checking and reprocessing is needed so that a payment isn't lost.
  • Refunds aren't thought through. If a product runs out or an order is cancelled, the procedure for returning the money must be defined in advance.
  • The "awaiting payment" status is forgotten. If the customer closed the payment window, the bot should remind them or cancel the order after a set time.

The cost of connecting payment to a bot

The scope of work depends on the number of payment systems, the payment channels (bot, Mini App, website), the need for refunds and partial payment, and the link to fiscal receipts and a cash register program. The exact price depends on the task: leave a request and we will estimate your situation.

Frequently asked questions

Do I need to be a legal entity to connect payment?

It depends on the requirements of the payment system you choose. Check the connection terms and the list of documents with it directly.

Is the customer's card data stored in the bot?

In a properly set up system, no: card data is entered on the payment system's side, and the bot and your server receive only the result of the payment.

Can several payment systems be connected to one bot?

Yes, the customer can be given a choice. But each system needs its own connection and testing.

Tired of checking transfers by hand? UFLEX is an IT team from Namangan: we do Telegram bot development with online payment, connect bots to a CRM or cash register, host them on a server and support them. We work remotely with clients from Tashkent and other cities of Uzbekistan. Leave a request or message us on Telegram.

Send a request

We will clarify the task and give you a price and timeline.

What do you need?

Your details are used only to contact you.

Read next