Skip to main content

starsTransaction

Represents a Telegram Stars or TON transaction ».

type tg.StarsTransaction struct { /* ... */ }

Fields

NameTypeRequiredDescription
RefundboolWhether this transaction is a refund.
PendingboolThe transaction is currently pending.
FailedboolThis transaction has failed.
GiftboolThis transaction was a gift from the user in peer.peer.
ReactionboolThis transaction is a paid reaction ».
StargiftUpgradeboolThis transaction pays for the upgrade of a gift to a collectible gift ».
BusinessTransferboolThis transaction transfers stars from the balance of a user account connected to a business bot, to the balance of the business bot, see here » for more info.
StargiftResaleboolThis transaction is related to the resale of a collectible gift ».
PostsSearchboolRepresents payment for a paid global post search ».
StargiftPrepaidUpgradeboolRepresents payment for a separate prepaid upgrade of a gift.
StargiftDropOriginalDetailsboolRepresents payment for the removal of the starGiftAttributeOriginalDetails attribute from a gift, see here » for the full flow.
PhonegroupMessageboolPhonegroupMessage field of StarsTransaction.
StargiftAuctionBidboolRepresents payment for placing a collectible gift auction bid ».
OfferboolRepresents payment for a collectible gift purchase offer ».
IDstringyesTransaction ID.
AmountStarsAmountClassyesAmount of Telegram Stars or TON.
DateintyesDate of the transaction (unixtime).
PeerStarsTransactionPeerClassyesSource of the incoming transaction, or its recipient for outgoing transactions.
TitlestringFor transactions with bots, title of the bought product.
DescriptionstringFor transactions with bots, description of the bought product.
PhotoWebDocumentClassFor transactions with bots, photo of the bought product.
TransactionDateintIf neither pending nor failed are set, the transaction was completed successfully, and this field will contain the point in time (Unix timestamp) when the withdrawal was completed successfully.
TransactionURLstringIf neither pending nor failed are set, the transaction was completed successfully, and this field will contain a URL where the withdrawal transaction can be viewed.
BotPayload[]byteBot specified invoice payload (i.e. the payload passed to inputMediaInvoice when creating the invoice).
MsgIDintFor paid media transactions », message ID of the paid media posted to peer.peer (can point to a deleted message; either way, extended_media will always contain the bought media).
ExtendedMedia[]MessageMediaClassThe purchased paid media ».
SubscriptionPeriodintThe number of seconds between consecutive Telegram Star debiting for Telegram Star subscriptions ».
GiveawayPostIDintID of the message containing the messageMediaGiveaway, for incoming star giveaway prizes.
StargiftStarGiftClassThis transaction indicates a purchase or a sale (conversion back to Stars) of a gift ».
FloodskipNumberintThis transaction is payment for paid bot broadcasts. Paid broadcasts are only allowed if the allow_paid_floodskip parameter of messages.sendMessage and other message sending methods is set while trying to broadcast more than 30 messages per second to bot users. The integer value returned by this flag indicates the number of billed API calls.
StarrefCommissionPermilleintThis transaction is the receival (or refund) of an affiliate commission (i.e. this is the transaction received by the peer that created the referral link, flag 17 is for transactions made by users that imported the referral link).
StarrefPeerPeerClassFor transactions made by referred users, the peer that received the affiliate commission.
StarrefAmountStarsAmountClassFor transactions made by referred users, the amount of Telegram Stars received by the affiliate, can be negative for refunds.
PaidMessagesintThis transaction is related to the reception or transmission of a paid message ».
PremiumGiftMonthsintThis transaction indicates the payment for a gifted Telegram Premium subscription ».
AdsProceedsFromDateintIndicates that this is payment for ad revenue from the specified unixtime (always set together with ads_proceeds_to_date).
AdsProceedsToDateintIndicates that this is payment for ad revenue to the specified unixtime.

References