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
@@ -123,6 +123,11 @@ type Config struct {
|
||||
// sats. A product without a price is not offered for Stars. In the
|
||||
// environment: STARS_PRICES="pass_day=50,credits_1000=70".
|
||||
StarsPrices map[string]int64 `toml:"stars_prices"`
|
||||
// AffiliateEnabled shows the Earn section's part about Telegram's
|
||||
// affiliate program (a share of Stars spent in the Mini App, paid by
|
||||
// Telegram). Turn it on once the program is set up for the bot, see
|
||||
// docs/AFFILIATE.md.
|
||||
AffiliateEnabled bool `toml:"affiliate_enabled" env:"AFFILIATE_ENABLED"`
|
||||
}
|
||||
|
||||
// StarsPrice returns the price in Stars of a product, or false when it
|
||||
|
||||
Reference in New Issue
Block a user