# TransactionPartnerAffiliateProgram

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

**Category:** Telegram Bot API — Types (A-Z)  
**URL:** https://docs.botlify.cloud/transactionpartneraffiliateprogram  
**Platform:** Botlify Cloud (https://botlify.cloud)  

---

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

## Fields

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| type | String | Always | Type of the transaction partner, always "affiliate_program" |
| sponsor_user | User | Optional | Information about the bot that sponsored the affiliate program |
| commission_per_mille | Integer | Always | The number of Telegram Stars received by the bot for each 1000 Telegram Stars received by the affiliate program sponsor from referred users |

> [!TIP]
> **Botlify Cloud Runtime**
> Credentials are auto-injected in .env — always load them with getenv(): BOT_TOKEN, ADMIN_CHAT_ID, BOT_USERNAME. Main database: database.db (SQLite, WAL mode). Runtime errors: error.log. Quick test: send to $ADMIN_CHAT_ID. Full details: Runtime Reference.
