Link Search Menu Expand Document

Method: payments.getStarsTransactions

Back to methods index

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.

Parameters:

NameTypeDescriptionRequired
inboundBoolIf set, fetches only incoming transactions.Optional
outboundBoolIf set, fetches only outgoing transactions.Optional
ascendingBoolReturn transactions in ascending order by date (instead of descending order by date).Optional
tonBoolIf set, returns the channel/ad revenue transactions in nanotons, instead.Optional
subscription_idstringIf set, fetches only transactions for the specified Telegram Star subscription ».Optional
peerUsername, chat ID, Update, Message or InputPeerFetch the transaction history of the peer (inputPeerSelf or a bot we own).Optional
offsetstringOffset for pagination, obtained from the returned next_offset, initially an empty string ».Optional
limitintMaximum number of results to return, see paginationOptional

Return type: payments.StarsStatus

Can users use this method: YES

Can bots use this method: YES

Can bots use this method over a business connection with the businessConnectionId flag: NO

MadelineProto Example (now async for huge speed and parallelism!):

if (!file_exists('madeline.php')) {
    copy('https://phar.madelineproto.xyz/madeline.php', 'madeline.php');
}
include 'madeline.php';

$MadelineProto = new \danog\MadelineProto\API('session.madeline');
$MadelineProto->start();

$payments_StarsStatus = $MadelineProto->payments->getStarsTransactions(inbound: $Bool, outbound: $Bool, ascending: $Bool, ton: $Bool, subscription_id: 'string', peer: $InputPeer, offset: 'string', limit: $int, );