Skip to main content

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

NameTypeRequiredDescription
InboundboolIf set, fetches only incoming transactions.
OutboundboolIf set, fetches only outgoing transactions.
AscendingboolReturn transactions in ascending order by date (instead of descending order by date).
TonboolIf set, returns the channel/ad revenue transactions in nanotons, instead.
SubscriptionIDstringIf set, fetches only transactions for the specified Telegram Star subscription ».
PeerInputPeerClassyesFetch the transaction history of the peer (inputPeerSelf or a bot we own).
OffsetstringyesOffset for pagination, obtained from the returned next_offset, initially an empty string ».
LimitintyesMaximum number of results to return, see pagination

Returns

*PaymentsStarsStatus

Possible errors

CodeTypeDescription
400CHAT_ADMIN_REQUIREDYou must be an admin in this chat to do this.
400PEER_ID_INVALIDThe provided peer id is invalid.
400SUBSCRIPTION_ID_INVALIDThe specified subscription_id is invalid.

References