Developer documentation

Telegram Bot payments: Stars, orders and refunds

Choose the correct payment flow, verify successful_payment before fulfillment and retain charge identity for refunds.

GetTGAPI editorial teamUpdated
Documentation notesReviewed

Based on official sources and independently maintained by GetTGAPI. Documentation and glossary →

On this page
  1. Identify the product category
  2. Fulfill after payment evidence
  3. Order-design recommendations
  4. Testing boundaries

Identify the product category

Digital goods and services inside Telegram use Stars with currency XTR; physical goods and services follow provider-backed payments. Buyers’ Stars acquisition costs can differ from merchant rewards. Ordinary currencies use the exponent in the official currency data, not a universal factor of 100.

Fulfill after payment evidence

After invoicing, handle pre_checkout_query, then wait for successful_payment. Pre-checkout approval is not settlement. Retain telegram_payment_charge_id for reconciliation and refunds. Digital Stars payments do not require the physical-payment provider token.

Order-design recommendations

Bind an order to the bot, customer, product, currency and amount. Verify those fields and deduplicate payment events by charge identity. A paid but failed fulfillment needs a tracked compensation or refund path, not another payment demand.

Testing boundaries

Telegram offers a Stars test environment. Local simulations validate code paths, not real payment acceptance. Provide payment support and a trace from charge to fulfillment result.