Webhook integration for the Telegram Stars API
Get order and payment status in real time via webhook: signature verification, idempotency, retry and best practices. Automatic integration with the StarsPaymee API — 18 Q&A.
A webhook is an HTTP request that the StarsPaymee API sends to your server automatically when an order or payment status changes. Thanks to it you don't poll the status constantly — instead you react as soon as a «delivered» or «failed» event arrives. The webhook is the heart of automatic integration.
What is a webhook and why is it needed?
With polling you ask «is the order ready?» every few seconds — which wastes resources and is slow. With a webhook the API notifies you as soon as an event happens. It's faster, cheaper and closer to real time.
- Event type — order.delivered, order.failed, payment.success.
- Order ID and status.
- A timestamp.
- A signature — to verify authenticity.
How do I connect a webhook?
- 1. Provide a URLIn the StarsPaymee panel provide your webhook URL (HTTPS).
- 2. Verify the signatureVerify the signature with a secret key on every incoming request.
- 3. IdempotencyStore the event ID and don't reprocess a repeat.
- 4. Respond quicklyReturn 200 OK; put heavy work in a queue.
Need webhook integration? Contact Business.
@StarsPaymee_botBest practices
- Use HTTPS only.
- Always verify the signature.
- Prevent repeats with an idempotency key.
- Account for a retry policy.
- Log and monitor events.
Related: Stars API, Click callback and connecting a payment API to a bot.
- core.telegram.org/bots/webhooks — webhook guide
- core.telegram.org/bots/payments — bot payments
Frequently asked questions
What is a webhook?
Difference between webhook and polling?
How do I connect a webhook?
Which events arrive?
Why a signature?
What is idempotency?
How fast should I respond?
Will there be retries?
Is HTTPS required?
Can I test it?
Are logs needed?
What if the webhook didn't arrive?
Can I subscribe to several events?
Is it related to the Click callback?
What else for security?
Is it in JSON?
Is documentation provided?
How do I start?
Connect the webhook
Through StarsPaymee Business, build a real‑time integration with webhooks.
Open the botRelated articles
Growing a Telegram channel: content, boost and budget
What actually drives growth, where boost genuinely helps, and how to plan the budget.
ReadWhat is the Telegram Stars API and how to connect? (2026)
The Telegram Stars API is a REST/JSON API for auto‑selling Stars, Premium and Gifts. How it works, who it's for and how to connect via StarsPaymee Business — a full guide and 27 Q&A.
ReadThe cheapest Telegram API service in Uzbekistan (2026)
How to choose the cheapest Telegram API in Uzbekistan: per‑unit price, local so‘m payment, no hidden fees, fast delivery. StarsPaymee Business — Stars, Premium, Gifts, Click and SBP in one place.
Read
