telegram api constructor · layer 229 · #dd0c66f2

starRefProgram

Indo about an affiliate program offered by a bot

definition

starRefProgram#dd0c66f2 flags:# bot_id:long commission_permille:int duration_months:flags.0?int end_date:flags.1?int daily_revenue_per_user:flags.2?StarsAmount = StarRefProgram;

parameters

nametypedescription
flags#Flags, see TL conditional fields
bot_idlongID of the bot that offers the program
commission_permilleintAn affiliate gets a commission of starRefProgram.commission_permille‰ Telegram Stars for every mini app transaction made by users they refer
duration_monthsflags.0?intAn affiliate gets a commission for every mini app transaction made by users they refer, for duration_months months after a referral link is imported, starting the bot for the first time
end_dateflags.1?intPoint in time (Unix timestamp) when the affiliate program will be closed (optional, if not set the affiliate program isn't scheduled to be closed)
daily_revenue_per_userflags.2?StarsAmountThe amount of daily revenue per user in Telegram Stars of the bot that created the affiliate program. To obtain the approximated revenue per referred user, multiply this value by commission_permille and divide by 1000.

type

StarRefProgram

history

present in layers 195–229

idlayers
#dd0c66f2195–229