Accepting Telegram Stars in your bot: the whole XTR payment flow

Chronological Source Flow
Back

AI Fusion Summary

Telegram Stars payments let bots sell digital goods like premium features or credits using the XTR currency. The flow involves a pre_checkout_query, a successful_payment update, and calls to answerPreCheckoutQuery or refundStarPayment. Developers must guard against double deliveries, duplicate charges, and unexpected refunds. The guide provides a ten‑line example using plain fetch to the Bot API, making it language‑agnostic and production‑ready.
Community Comments
Loading updates...
0