{
  "id": 15070780,
  "title": "How to accept Telegram Stars in your bot (the full flow, plus a no-code shortcut)",
  "url": "https://urgent.news/2026/10/16/how-to-accept-telegram-stars-in-your-bot-the-full-flow-plus-a-no-code",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-10-16T23:39:06.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/marylyn_roundy_e32b126c99/how-to-accept-telegram-stars-in-your-bot-the-full-flow-plus-a-no-code-shortcut-2pa2"
  },
  "original_language": "en",
  "account": "To sell digital products through a Telegram bot, you must accept payments in Telegram Stars (XTR). This payment method follows the same rules as the App Store and Play Store for digital goods and services. To accept Stars payments, follow these six steps:\n\n1. Send an invoice using the sendInvoice method, specifying the currency as XTR.\n2. When the buyer clicks Pay, Telegram sends a pre_checkout_query update. Respond to this update within 10 seconds by calling answerPreCheckoutQuery with the value \"true\" to approve the payment.\n3. After the payment is successful, Telegram sends a successful_payment update containing the telegram_payment_charge_id. Save this value in your bot's data, as you'll need it for refunds.\n4. Deliver the product or service to the buyer. For digital goods, you don't need a provider_token, so leave it empty.\n5. To handle refunds, call the refundStarPayment method with the user_id and telegram_payment_charge_id.\n6. Keep in mind some important considerations to avoid losing money: only deliver the product after the successful_payment update, check your stock and order validity within the 10-second window for the pre_checkout_query update, deduplicate by telegram_payment_charge_id to avoid double deliveries, and ensure your pre-checkout handler is fast to prevent network retries from causing duplicate deliveries.",
  "summary": "If your Telegram bot sells anything digital (an ebook, a course, a preset pack, access to a private channel), Telegram expects you to charge in Telegram Stars . Card providers are only allowed for physical goods. This post walks through the whole Stars payment flow with a small working example, the gotchas that cost people money, and how much you actually receive. Why Stars and not cards?…",
  "key_points": [
    "Accept Telegram Stars payments by sending an invoice with currency XTR",
    "Respond to precheckoutquery update within 10 seconds to approve payment",
    "Save telegrampaymentchargeid for refunds and product delivery"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}