# `ExGram.Model.AffiliateInfo`
[🔗](https://github.com/rockneurotiko/ex_gram/blob/0.64.0/lib/ex_gram.ex#L7058)

Contains information about the affiliate that received a commission via this transaction.

Check the [documentation of this model on Telegram Bot API](https://core.telegram.org/bots/api#affiliateinfo)

- `commission_per_mille`: The number of Telegram Stars received by the affiliate for each 1000 Telegram Stars received by the bot from referred users
- `amount`: Integer amount of Telegram Stars received by the affiliate from the transaction, rounded to 0; can be negative for refunds
- `affiliate_user (optional)`: Optional. The bot or the user that received an affiliate commission if it was received by a bot or a user
- `affiliate_chat (optional)`: Optional. The chat that received an affiliate commission if it was received by a chat
- `nanostar_amount (optional)`: Optional. The number of 1/1000000000 shares of Telegram Stars received by the affiliate; from -999999999 to 999999999; can be negative for refunds

# `t`

```elixir
@type t() :: %ExGram.Model.AffiliateInfo{
  affiliate_chat: ExGram.Model.Chat.t() | nil,
  affiliate_user: ExGram.Model.User.t() | nil,
  amount: integer(),
  commission_per_mille: integer(),
  nanostar_amount: integer() | nil
}
```

# `decode_as`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
