Download the PHP package telegram-bot-essentials/affiliates without Composer
On this page you can find all versions of the php package telegram-bot-essentials/affiliates. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download telegram-bot-essentials/affiliates
More information about telegram-bot-essentials/affiliates
Files in telegram-bot-essentials/affiliates
Package affiliates
Short Description Referral tracking and wallet commission payouts for telegram-bot-essentials/essence
License MIT
Informations about the package affiliates
Telegram Bot Essentials — Affiliates
A referral program for the
telegram-bot-essentials/essence
ecosystem. Every user gets a shareable deep link; signups through it are tracked; both the
referrer and (optionally) the new user can be paid a signup bonus; and referrers earn an
ongoing commission on their referred users' purchases. Bonuses and commissions are paid
straight into user-wallet.
Depends on essence's deep-link handling,
settings,
billing events, and
user-wallet.
Installation
Everything is configured per-bot through Settings:
| Setting | Type | Default |
|---|---|---|
affiliates.affiliates_status |
CHECKBOX |
false |
affiliates.allow_existing_users |
CHECKBOX |
false |
affiliates.share_percentage |
NUMBER |
10 |
affiliates.referrer_signup_bonus |
NUMBER |
0 |
affiliates.referred_signup_bonus |
NUMBER |
0 |
affiliates.share_tagline |
TEXT |
— |
How it works
- Each user's affiliate menu builds
https://t.me/{bot}?start={referral_code}. - A new user opening that link fires essence's
BotDeepLinkReceived; the package creates aReferraland pays the signup bonuses. - Attribution is first-touch-wins (a
unique(bot_id, bot_user_id)constraint) and, by default, new users only. Self-referral is rejected. - Every paid Billing invoice from a referred user credits the referrer a percentage (rounded down, wallet top-ups excluded). A later invoice revocation claws it back.
Commission listeners are queued (queue: billing) and restore the webhook context first,
since invoice events can fire from a gateway callback with no "current user".
Documentation
Full documentation — the attribution rules, commission math, data model, and member UI — lives on the Telegram Bot Essentials documentation site under Modules → Affiliates.
License
MIT.
All versions of affiliates with dependencies
brick/math Version >=0.14.2 <1.0
laravel/framework Version ^12 || ^13
telegram-bot-essentials/billing Version ~0.0.32
telegram-bot-essentials/essence Version ^0.19.0-beta.9@beta
telegram-bot-essentials/settings Version ~0.0.17
telegram-bot-essentials/user-wallet Version ~0.0.22