Represents a Telegram Stars transaction ».
starsTransaction#2db5418f flags:# refund:flags.3?true pending:flags.4?true failed:flags.6?true gift:flags.10?true id:string stars:long 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> = StarsTransaction;
Name | Type | Description |
---|---|---|
flags | # | Flags, see TL conditional fields |
refund | flags.3?true | Whether this transaction is a refund. |
pending | flags.4?true | The transaction is currently pending. |
failed | flags.6?true | This transaction has failed. |
gift | flags.10?true | This transaction was a gift from the user in peer.peer . |
id | string | Transaction ID. |
stars | long | Amount of Stars (negative for outgoing transactions). |
date | int | Date of the transaction (unixtime). |
peer | StarsTransactionPeer | Source of the incoming transaction, or its recipient for outgoing transactions. |
title | flags.0?string | For transactions with bots, title of the bought product. |
description | flags.1?string | For transactions with bots, description of the bought product. |
photo | flags.2?WebDocument | For transactions with bots, photo of the bought product. |
transaction_date | flags.5?int | If 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_url | flags.5?string | If 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_payload | flags.7?bytes | Bot specified invoice payload (i.e. the payload passed to inputMediaInvoice when creating the invoice). |
msg_id | flags.8?int | For 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_media | flags.9?Vector<MessageMedia> | The purchased paid media ». |
Generated invoice of a bot payment
You can accept payments from Telegram users via Telegram Bots.
Content creators can accept Stars by publishing paid photos or videos on their channels. Subscribers will be allowed to view such posts only after paying the author to unlock them.
Telegram Stars are virtual items that allow users to purchase digital goods and services from bots and mini apps inside the Telegram ecosystem, send gifts to content creators on the Telegram platform, and more.