telegram api constructor · layer 229 · #13659eb0

starsTransaction

Represents a Telegram Stars or TON transaction ».

definition

starsTransaction#13659eb0 flags:# refund:flags.3?true pending:flags.4?true failed:flags.6?true gift:flags.10?true reaction:flags.11?true stargift_upgrade:flags.18?true business_transfer:flags.21?true stargift_resale:flags.22?true posts_search:flags.24?true stargift_prepaid_upgrade:flags.25?true stargift_drop_original_details:flags.26?true phonegroup_message:flags.27?true stargift_auction_bid:flags.28?true offer:flags.29?true id:string amount:StarsAmount date:int peer:StarsTransactionPeer title:flags.0?string description:flags.1?string photo:flags.2?WebDocument transaction_date:flags.5?int transaction_url:flags.5?string bot_payload:flags.7?bytes msg_id:flags.8?int extended_media:flags.9?Vector<MessageMedia> subscription_period:flags.12?int giveaway_post_id:flags.13?int stargift:flags.14?StarGift floodskip_number:flags.15?int starref_commission_permille:flags.16?int starref_peer:flags.17?Peer starref_amount:flags.17?StarsAmount paid_messages:flags.19?int premium_gift_months:flags.20?int ads_proceeds_from_date:flags.23?int ads_proceeds_to_date:flags.23?int = StarsTransaction;

parameters

nametypedescription
flags#Flags, see TL conditional fields
refundflags.3?trueWhether this transaction is a refund.
pendingflags.4?trueThe transaction is currently pending.
failedflags.6?trueThis transaction has failed.
giftflags.10?trueThis transaction was a gift from the user in peer.peer.
reactionflags.11?trueThis transaction is a paid reaction ».
stargift_upgradeflags.18?trueThis transaction pays for the upgrade of a gift to a collectible gift ».
business_transferflags.21?trueThis 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.
stargift_resaleflags.22?trueThis transaction is related to the resale of a collectible gift ».
posts_searchflags.24?trueRepresents payment for a paid global post search ».
stargift_prepaid_upgradeflags.25?trueRepresents payment for a separate prepaid upgrade of a gift.
stargift_drop_original_detailsflags.26?true
phonegroup_messageflags.27?true
stargift_auction_bidflags.28?true
offerflags.29?true
idstringTransaction ID.
amountStarsAmountAmount of Telegram Stars or TON.
dateintDate of the transaction (unixtime).
peerStarsTransactionPeerSource of the incoming transaction, or its recipient for outgoing transactions.
titleflags.0?stringFor transactions with bots, title of the bought product.
descriptionflags.1?stringFor transactions with bots, description of the bought product.
photoflags.2?WebDocumentFor transactions with bots, photo of the bought product.
transaction_dateflags.5?intIf 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.
transaction_urlflags.5?stringIf 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.
bot_payloadflags.7?bytesBot specified invoice payload (i.e. the payload passed to inputMediaInvoice when creating the invoice).
msg_idflags.8?intFor 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).
extended_mediaflags.9?Vector<MessageMedia>The purchased paid media ».
subscription_periodflags.12?intThe number of seconds between consecutive Telegram Star debiting for Telegram Star subscriptions ».
giveaway_post_idflags.13?intID of the message containing the messageMediaGiveaway, for incoming star giveaway prizes.
stargiftflags.14?StarGiftThis transaction indicates a purchase or a sale (conversion back to Stars) of a gift ».
floodskip_numberflags.15?intThis 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.
starref_commission_permilleflags.16?intThis 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).
starref_peerflags.17?PeerFor transactions made by referred users, the peer that received the affiliate commission.
starref_amountflags.17?StarsAmountFor transactions made by referred users, the amount of Telegram Stars received by the affiliate, can be negative for refunds.
paid_messagesflags.19?intThis transaction is related to the reception or transmission of a paid message ».
premium_gift_monthsflags.20?intThis transaction indicates the payment for a gifted Telegram Premium subscription ».
ads_proceeds_from_dateflags.23?intIndicates that this is payment for ad revenue from the specified unixtime (always set together with ads_proceeds_to_date).
ads_proceeds_to_dateflags.23?intIndicates that this is payment for ad revenue to the specified unixtime.

type

StarsTransaction

history

present in layers 181–229 · constructor id changed 9×

idlayers
#cc7079b2181
#aa00c898182
#2db5418f183–185
#433aeb2b186
#ee7522d5187–188
#0a9ee4c2189–191
#35d4f276192–194
#64dfc926195–199
#a39fd94a200–205
#13659eb0206–229