StarsTransaction

class pyrogram.types.StarsTransaction[source]

Contains information about a Telegram Stars transaction.

Parameters:
  • id (str) – Unique identifier of the transaction.

  • amount (float) – Amount of Stars credited (+) or debited (-).

  • date (datetime) – Date the transaction took place.

  • raw_amount (StarAmount, optional) – Raw StarAmount object containing whole stars and nano fractions.

  • peer (str | User | Chat, optional) – Source or destination of the transaction. Can be a string (“play_market”, “fragment”, “premium_bot”, “ads”, “api”) or a resolved User/Chat.

  • user (User, optional) – The user involved in the transaction, if applicable.

  • chat (Chat, optional) – The chat / channel involved in the transaction, if applicable.

  • refund (bool, optional) – True, if the transaction was refunded.

  • pending (bool, optional) – True, if the transaction is currently pending.

  • failed (bool, optional) – True, if the transaction failed.

  • gift (bool, optional) – True, if the transaction is related to a Star gift.

  • reaction (bool, optional) – True, if the transaction is for a paid reaction.

  • title (str, optional) – Title of the purchased digital goods or service.

  • description (str, optional) – Description of the transaction.

  • bot_payload (bytes, optional) – Bot-specified invoice payload.

  • msg_id (int, optional) – Identifier of the message containing the paid media or invoice.

  • transaction_date (datetime, optional) – Date of the external transaction (e.g. app store or Fragment).

  • transaction_url (str, optional) – URL of the external transaction receipt.

  • subscription_period (int, optional) – The subscription period in seconds, if this transaction was for a star subscription.

  • giveaway_post_id (int, optional) – The message ID of the giveaway in the chat, if applicable.