Skip to main content

starRefProgram

Info about an affiliate program offered by a bot

type tg.StarRefProgram struct { /* ... */ }

Fields

NameTypeRequiredDescription
BotIDint64yesID of the bot that offers the program
CommissionPermilleintyesAn affiliate gets a commission of starRefProgram.commission_permille‰ Telegram Stars for every mini app transaction made by users they refer
DurationMonthsintAn 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
EndDateintPoint in time (Unix timestamp) when the affiliate program will be closed (optional, if not set the affiliate program isn't scheduled to be closed)
DailyRevenuePerUserStarsAmountClassThe 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.

Returned by

References