Useful functions for a telegram bot.

Telegram Login and Payments are the familiar entry points. For most businesses, other mechanisms deliver more impact: deep links, webhook-driven events, Mini Apps, and selective inline mode.

Here is a practical view — what each feature does for a salon, shop, or restaurant owner, not “for the technology itself.”

Deep links: context before the first message

A URL like https://t.me/your_bot?start=promo_spring passes a hidden parameter to the bot. The customer scans a table QR, clicks an ad, or opens an email — and the bot already knows the source, table, or offer.

Practice: one bot, many entry points. Separate payloads for each storefront, influencer, or sales card. Restaurant usage is covered in deep linking for restaurants. PHP payload mapping: start=payload guide.

Webhooks: react immediately, without polling

A webhook is an HTTPS request from Telegram to your server on every message, button tap, or payment. What matters for business is the outcome:

  • leads reach a manager in seconds;
  • order status updates without someone “checking the chat”;
  • reminders and escalations can be event-driven, not “once per hour.”

Production usually uses webhooks; leave long polling for local debugging. Reliable intake (secret token, idempotency, queues) is an engineering task of its own.

Business rule: answer Telegram quickly (HTTP 200) and run heavy logic in the background. Otherwise the bot stalls during order spikes.

Mini Apps: catalog and cart inside Telegram

When button menus get tight (catalog, filters, slot calendar), open a Web App. The customer stays in Telegram, gets a familiar UI, and can pay without jumping to a separate site.

Common cases: restaurant menu, salon booking, storefront. For e-commerce flows see the online store bot post.

Inline mode: help inside someone else’s chat

A user types @your_bot query in a chat with a friend or in a group and picks a result card. The bot does not need to be a group admin.

Business examples: share a hotel or dish card, drop a promo code, send a service “business card.” Use it selectively — not every product needs inline.

What to ship first

  1. Deep links + QR if you have offline points or ads with different sources.
  2. Stable webhooks and manager alerts if response speed equals revenue.
  3. Mini App when catalog or booking no longer fits buttons.
  4. Inline when customers already share your content in chats.

Common mistakes

  • one shared start= for every venue — you lose source analytics;
  • Mini App without mobile layout — the catalog breaks on phones;
  • webhook without secret token and idempotency — duplicate orders and fake updates;
  • inline results without moderation — outdated prices land in other people’s chats.

Need deep links, webhooks, and a Mini App wired to your process? Talk it through at botservice.biz.

New articles on Telegram

We explain what to automate in your business and how it works in practice. No spam.