Layer 220
PaymentsGetStarsTransactions
Fetch Telegram Stars transactions.
method
Users
Bots
Parameters
| Name | Type | Description |
|---|---|---|
| Flags | # | Flags, see TL conditional fields |
| Inbound | flags.0?true | If set, fetches only incoming transactions. |
| Outbound | flags.1?true | If set, fetches only outgoing transactions. |
| Ascending | flags.2?true | Return transactions in ascending order by date (instead of descending order by date). |
| Ton | flags.4?true | If set, returns the channel/ad revenue transactions in nanotons, instead. |
| SubscriptionId | flags.3?string | If set, fetches only transactions for the specified Telegram Star subscription. |
| Peer | InputPeer | Fetch the transaction history of the peer ( input Peer Self or a bot we own). |
| Offset | string | Offset for pagination, obtained from the returned next_offset, initially an empty string. |
| Limit | int | Maximum number of results to return, see pagination |
Returns
payments.StarsStatusPossible Errors
| Code | Type | Description |
|---|---|---|
| 400 | CHAT_ADMIN_REQUIRED | You must be an admin in this chat to do this. |
| 400 | PEER_ID_INVALID | The provided peer id is invalid. |
| 400 | SUBSCRIPTION_ID_INVALID | The specified subscription_id is invalid. |
Gogram Example
// PaymentsGetStarsTransactions - using Params struct result, err := client.PaymentsGetStarsTransactions(&tg.PaymentsGetStarsTransactionsParams{ Peer: &tg.InputPeerUser{UserID: int64(123456789)}, Offset: "...", Limit: 0, // Optional fields: // Inbound: true, // Outbound: true, // Ascending: true, // Ton: true, // ... }) if err != nil { // handle error } // result is *tg.PaymentsStarsStatus