Layer 227
PaymentsGetStarsTransactions
Fetch Telegram Stars transactions.
method
Users
Bots
payments.getStarsTransactions#69da4557 flags:# inbound:flags.0?true outbound:flags.1?true ascending:flags.2?true ton:flags.4?true subscription_id:flags.3?string peer:InputPeer offset:string limit:int = payments.StarsStatus;
Parameters
| Name | Type | Description |
|---|---|---|
| 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 nanograms, 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.StarsStatusGogram Example
// PaymentsGetStarsTransactions - using Params struct result, err := client.PaymentsGetStarsTransactions(&tg.PaymentsGetStarsTransactionsParams{ Inbound: nil, Outbound: nil, Ascending: nil, Ton: nil, SubscriptionId: "Hello, World!", Peer: &tg.InputPeerUser{UserID: int64(777000)}, Offset: "Hello, World!", Limit: 42, }) if err != nil { // handle error } // result is *tg.PaymentsStarsStatus
Possible 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. |