Raw.StarRefProgram

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 : bigint

    Id of the bot that offers the program

  • commissionPermille : number

    An affiliate gets a commission of starrefprogram.commissionPermille‰ telegram stars for every mini app transaction made by users they refer

  • durationMonths : number or undefined

    An 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 undefined

    Point 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 undefined

    The 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.