Home · Blog · Cart in a Telegram bot: how a shopper builds an order and what the seller sees
Cart in a Telegram bot: how a shopper builds an order and what the seller sees
A bot with a catalog on buttons can show a product, but a cart is harder: every card is a separate message, picking three items in different sizes is awkward, and a manager adds up the total by hand. In the CHBT shop the cart lives in the storefront, which opens right inside Telegram. Here is the whole path of an order: how the shopper gets into the shop, what happens to prices and stock, how the order is placed and what the seller sees afterwards.
Where the cart lives
The cart is part of the shop storefront at chbt.io/s/your-shop. In Telegram the storefront opens right in the chat as a mini app: a product grid, search, a card with variants and an Add to cart button. In MAX — as the bot’s mini app, if you turned on Open the storefront as a mini app. In VK and in the website chat the button arrives as a link and opens the same storefront in the browser.
The cart contents are remembered in the shopper’s browser on that device. Closed the storefront and came back in the evening — the products are still there. Opened the shop on another phone — it has its own cart.
How a shopper gets into the shop
- A button in a flow. Add a button with the Opens the shop action to a Message. Empty — the whole catalog opens,
p/123— a specific product,c/Candles— a category. - The “Shop” menu button in Telegram — to the left of the input field. It is turned on in the shop settings, in the Where to open the shop block; the previous menu button is saved and restored when you turn it off.
- The AI sales assistant shows a “Buy in the shop” button for products with a shop price.
- A direct link to the storefront — in the channel description, on the website, on social media.
When the storefront is opened with a button from the bot, the order is linked to the shopper’s conversation: order notifications come to them in the same chat. If the storefront is opened just by a link in a browser, the order is placed, but the card shows the note “storefront in a browser”.
Prices and stock are calculated by the server
The storefront sends the server only “which variant and how many”. The price, stock, delivery cost and total are calculated by CHBT — both for the cart screen and at the moment of checkout. A price cannot be tampered with in the browser, and the shopper always sees current numbers.
If something changed while the product was in the cart, the shopper sees a clear message rather than an error:
- “… is no longer on sale — removed from the cart”;
- “… is out of stock — removed from the cart”;
- “… only 2 in stock — that is what we left”;
- “Prices or availability have changed — please check your order.”
The cart can hold up to 50 different items, up to 999 of each.
Placing the order
The Checkout button opens a form:
- Name and Phone — the phone is required; without it the order will not be placed;
- Email (optional) — if given, order emails will also be sent;
- Delivery method — pickup with a choice of point, courier, nationwide delivery or your own option; for delivery — a Delivery address;
- Order comment;
- Payment — On delivery or Online: card or SBP, if a payment provider is connected;
- the “I agree to the processing of my personal data” checkbox.
At the bottom is the Total with delivery. If the amount is below the minimum, the cart tells you how much more to add. The final button is Place order for payment on delivery or Proceed to payment for online payment.
Delivery and minimum amount
The seller sets delivery methods in the Delivery section: Pickup with points, addresses and opening hours, Courier, Nationwide delivery or Other. Each method has its own price and a “free from” amount — the order value from which delivery is free. The Ask for a delivery address checkbox adds an address field to the form.
The delivery cost is added to the order and is visible to the shopper before confirmation. There is no calculation by delivery service tariffs: you set the price of each method yourself.
The Minimum order amount is set in the shop settings. Until it is reached, the order cannot be placed, and the cart says: “The minimum order amount is … Add products for another …”.
Stock is reserved right away
Stock is deducted at the moment of the order. If one item is left, two people cannot buy it: the second shopper will see that it is out of stock.
- Payment on delivery — the order goes to the seller right away.
- Online payment — the order waits for payment for 45 minutes, with the product reserved all that time. Not paid — the order is cancelled automatically and the stock is returned.
- Cancellation — a cancelled order returns the product to stock.
So that the storefront does not get clogged with reservations, one shopper cannot have many unpaid orders at once: the storefront will ask them to pay for those first or wait for them to be cancelled.
Online payment
Proceed to payment opens your payment provider’s page — YooKassa or CloudPayments. The shopper pays by card or via SBP, the money goes to your account, and CHBT does not touch it. When the provider confirms the payment, the order becomes Paid — only the provider sets this status; it cannot be set by hand.
Online payment works for shops in roubles. Shops in tenge and sums accept payment on delivery. There is no card payment inside Telegram itself — payment always happens on the provider’s page.
Digital products in Telegram — courses, access, files — are sold for stars: such a product has a “Buy for … ★” button instead of the cart, a single-item order without delivery. More in the article on payment in stars.
What the seller sees
A new order reaches the seller in Telegram or MAX, if Notifications in messengers are set up, by email, as a push notification and in Shop → Orders. The order card shows the products, the shopper with their phone, the delivery method, payment, comment and history.
Then the seller moves the order through statuses: Being prepared, Sent, Ready for pickup, Completed or Cancel order. The shopper gets a message about each new status in their chat. The CRM deal moves together with the order: a completed one is won, a cancelled one is lost. The Open conversation button leads to the chat with the shopper if something needs clarifying.
In detail about which messages go to the shopper and the seller — in the article on order notifications.
What the cart needs to work
- The Basic plan or higher — 650 ₽ a month per bot. On Free the shop section is visible, but the storefront does not accept orders.
- Products with a shop price — your own, created in Shop → Products, or catalog products with a separately set shop price.
- At least one delivery method in Delivery.
- For online payment — seller details and a connected YooKassa or CloudPayments.
- The storefront accepts orders — turn it on in the shop settings when everything is ready.
CHBT takes no percentage of orders: only the payment provider charges a fee for online payment under its own contract.
Example: a candle order from button to pickup
- A shopper writes to a candle workshop’s bot “I want a gift”. The flow asks about the occasion with buttons and replies with a message with an Opens the shop button for the
c/Gift setscategory. - The storefront opens right in Telegram. She puts a set and two candles with different scents into the cart — two variants of one product.
- Checkout: name, phone, pickup from the studio, the comment “please wrap it as a gift”, online payment. Proceed to payment — the provider’s page, payment via SBP.
- The provider confirms the payment, and the order becomes Paid. The shopper gets a message in the same chat, and the maker gets a Telegram notification with a link to the order card.
- The maker assembles the set and sets Ready for pickup — the shopper gets a message with the point address and opening hours. After pickup — Completed, and the CRM deal is closed as won.
The manager did not write a single message by hand along the whole path, and the full order history is visible both in the card and in the conversation.
A cart on buttons or a storefront
You can also build a cart in an ordinary flow — with buttons and variables. But every item takes several messages, the total has to be calculated by hand, nobody reserves stock, and the shopper scrolls the chat up and down to remember what they picked. For two or three products that is bearable; for a catalog it is not.
The storefront solves exactly these problems: products in a grid with photos, variants in the card, a total with delivery, stock reservation and an order with statuses. The bot flow stays for what it does best: answering a question, picking a gift with buttons, taking a service request and bringing people to the shop with an Opens the shop button.
Common mistakes
- The storefront accepts orders is not turned on. Shoppers see the products but cannot place an order.
- No delivery method. Checkout will not go through without one — add at least pickup.
- Catalog products without a shop price. They cannot be put into the cart — set a shop price separately from the marketplace price.
- A storefront link instead of a button. A storefront opened by a plain link does not know which conversation the shopper came from. Put an Opens the shop button into the flow.
- Zero stock. A product with stock 0 cannot be put into the cart — check stock after uploading.
Order notifications in a botA shop in a bot or a websiteTelegram Stars payment in a botProduct catalog