Phase 5: Telegram affiliate program
- docs/AFFILIATE.md: the owner's setup in Telegram (profile editor or BotFather's Mini App), commission and duration rules (raise only, end with commission 0, about 24 hours), who counts as referred, the link formats, and the no-double-rewards rule. Checked against Telegram's current pages. - Affiliate purchases go through Stars invoices inside the Mini App (createInvoiceLink and WebApp.openInvoice, from Phase 4). - /start accepts any payload; only our own rf_ (and old ref_) links set an inviter. A test sends payloads of every shape, Telegram's affiliate prefix included. - Mini App Me page: an Earn section explaining both programs, with how to join Telegram's from the bot's profile, behind AFFILIATE_ENABLED. No affiliate numbers are computed or shown. - /referral notes that Stars purchases earn through Telegram's program. - The optional MTProto CLI is left out, with the reason in the docs. - The Mini App browser test checks the Earn section in en, es and nl. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
2b5625e9d4
commit
d64db03f21
@@ -255,7 +255,7 @@ func (m *MiniApp) me(w http.ResponseWriter, r *http.Request, s *session) {
|
||||
MaxSize: dec.Limits.MaxSize, MaxDuration: dec.Limits.MaxDuration, ActiveJobs: dec.Limits.ActiveJobs,
|
||||
DailyDownloads: dec.Limits.DailyDownloads, DailyBytes: dec.Limits.DailyBytes,
|
||||
},
|
||||
"payments": m.Billing.Enabled(),
|
||||
"payments": m.Billing.Enabled(),
|
||||
"referral_link": refLink,
|
||||
"referral_count": refStats.Invited,
|
||||
"referral_converted": refStats.Converted,
|
||||
@@ -264,9 +264,13 @@ func (m *MiniApp) me(w http.ResponseWriter, r *http.Request, s *session) {
|
||||
"referral_qr": refQR,
|
||||
"referral_reward": m.Cfg.Prices.ReferralReward,
|
||||
"referral_daily_cap": m.Cfg.ReferralDailyCap,
|
||||
"support": support,
|
||||
"start_param": s.init.StartParam,
|
||||
"bot": m.Bot.Username(),
|
||||
// Telegram's affiliate program is set up and paid by Telegram; the
|
||||
// app only explains it, and shows no numbers of its own.
|
||||
"affiliate_enabled": m.Cfg.AffiliateEnabled,
|
||||
"stars_enabled": m.Billing.StarsEnabled(),
|
||||
"support": support,
|
||||
"start_param": s.init.StartParam,
|
||||
"bot": m.Bot.Username(),
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user