StarTransaction

Raw MD
Describes a Telegram Star transaction

Describes a Telegram Star transaction. Note that if the buyer initiates a chargeback with the payment provider from whom they acquired Stars (e.g., Apple, Google) following this transaction, the refunded Stars will be deducted from the bot's balance. This is outside of Telegram's control.

Fields

FieldTypeRequiredDescription
idStringAlwaysUnique identifier of the transaction. Coincides with the identifier of the original transaction for refund transactions. Coincides with SuccessfulPayment.telegram_payment_charge_id for successful incoming payments from users.
amountIntegerAlwaysInteger amount of Telegram Stars transferred by the transaction
nanostar_amountIntegerOptionalThe number of 1/1000000000 shares of Telegram Stars transferred by the transaction; from 0 to 999999999
dateIntegerAlwaysDate the transaction was created in Unix time
sourceTransactionPartnerOptionalSource of an incoming transaction (e.g., a user purchasing goods or services, Fragment refunding a failed withdrawal). Only for incoming transactions.
receiverTransactionPartnerOptionalReceiver of an outgoing transaction (e.g., a user for a purchase refund, Fragment for a withdrawal). Only for outgoing transactions.
Botlify Cloud Runtime
Credentials are auto-injected in .env — always load them with getenv(): BOT_TOKEN, ADMIN_CHAT_ID, BOT_USERNAME. Main database: database.db (SQLite, WAL mode). Runtime errors: error.log. Quick test: send to $ADMIN_CHAT_ID. Full details: Runtime Reference.