Raw.StarRefProgram
Indo about an affiliate program offered by a bot
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;
export namespace Raw {
export class StarRefProgram {
constructor(params: {
botId: bigint;
commissionPermille: number;
durationMonths?: number;
endDate?: number;
dailyRevenuePerUser?: Raw.TypeStarsAmount;
}) {}
}
}
This is a types constructor, you can’t use it as method when call invoke.
Layer: 198
Constructor ID: 0xdd0c66f2
Property
botId
: bigintId of the bot that offers the program
commissionPermille
: numberAn affiliate gets a commission of starrefprogram.commissionPermille‰ telegram stars for every mini app transaction made by users they refer
durationMonths
: number or undefinedAn affiliate gets a commission for every mini app transaction made by users they refer, for durationMonths months after a referral link is imported, starting the bot for the first time
endDate
: number or undefinedPoint in time (unix timestamp) when the affiliate program will be closed (optional, if not set the affiliate program isn’t scheduled to be closed)
dailyRevenuePerUser
: Raw.TypeStarsAmount or undefinedThe 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 commissionPermille and divide by 1000.