Skip to content
Back to top
View this page

# TransactionPartnerAffiliateProgram

class telegram.TransactionPartnerAffiliateProgram(commission_per_mille, sponsor_user=None, *, api_kwargs=None)

  Bases: `telegram.TransactionPartner`

  Describes the affiliate program that issued the affiliate commission received via this transaction.

  This object is comparable in terms of equality. Two objects of this class are considered equal, if their `commission_per_mille` are equal.

  Available In

  - `telegram.StarTransaction.receiver`

  - `telegram.StarTransaction.source`

  Added in version 21.9.

  Parameters:

    - sponsor_user (`telegram.User`, optional) – Information about the bot that sponsored the affiliate program

    - commission_per_mille (`int`) – The number of Telegram Stars received by the bot for each 1000 Telegram Stars received by the affiliate program sponsor from referred users.

  type

    The type of the transaction partner, always `'affiliate_program'`.

    Type:

      `str`

  sponsor_user

    Optional. Information about the bot that sponsored the affiliate program

    Type:

      `telegram.User`

  commission_per_mille

    The number of Telegram Stars received by the bot for each 1000 Telegram Stars received by the affiliate program sponsor from referred users.

    Type:

      `int`

  classmethod de_json(data, bot=None)

    See `telegram.TransactionPartner.de_json()`.