payments.getStarsTransactions
Fetch Telegram Stars transactions. The inbound and outbound flags are mutually exclusive: if none of the two are set, both incoming and outgoing transactions are fetched.
func (c *Client) PaymentsGetStarsTransactions(ctx context.Context, request *PaymentsGetStarsTransactionsRequest) (*PaymentsStarsStatus, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.PaymentsGetStarsTransactions(ctx, &tg.PaymentsGetStarsTransactionsRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // *PaymentsStarsStatus
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
Inbound | bool | — | If set, fetches only incoming transactions. |
Outbound | bool | — | If set, fetches only outgoing transactions. |
Ascending | bool | — | Return transactions in ascending order by date (instead of descending order by date). |
Ton | bool | — | If set, returns the channel/ad revenue transactions in nanotons, instead. |
SubscriptionID | string | — | If set, fetches only transactions for the specified Telegram Star subscription ». |
Peer | InputPeerClass | yes | Fetch the transaction history of the peer (inputPeerSelf or a bot we own). |
Offset | string | yes | Offset for pagination, obtained from the returned next_offset, initially an empty string ». |
Limit | int | yes | Maximum number of results to return, see pagination |
Returns
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. |
References
- Official documentation
- Generated Go reference
- TL definition:
payments.getStarsTransactions#69da4557