Telegram Paid Group & Subscription Bot Kit: Stars Subscriptions, Auto-Kick (Source Code)
Sell access to your private Telegram group or channel on autopilot. Members pay with Telegram Stars and get a personal single-use invite link. The bot removes them when their access ends and reminds them to renew before that.
WHAT IT DOES
• Plans in one config file: monthly auto-renewing Stars subscription, fixed-term passes (e.g. 3 months) or lifetime
• Instant, personal invite links: single-use (member_limit 1) and expiring after 24h
• Link-sharing protection: anyone who joins with someone else's link is removed and you get notified
• Hourly cron: renewal reminders before expiry, automatic removal after expiry (grace period for subscription renewals)
• Renewals extend access automatically; buying again stacks time; /cancel stops auto-renew
• Admin: /stats (active, lifetime, auto-renew, Stars revenue, last 30 days), /members, /grant, /revoke, /broadcast, /sweep
• Members: /status, /link (fresh link), /cancel, /support, /paysupport
WHAT YOU GET
• Full TypeScript source for Cloudflare Workers + D1 + Cron Triggers (free tier), webhook-based with no server
• Supports one or several groups/channels per membership
• README with every step: BotFather, making the bot admin, finding the group id, wrangler secrets, D1 migration, one-click webhook setup that also checks the bot's admin rights
• Test suite (Vitest, 12 tests: payments, renewals, link-sharing kicks, cron expiry, admin)
• Commercial license for your own and client communities (no resale of the kit)
REQUIREMENTS
Free Cloudflare account, Node.js 22+, a Telegram group or channel you own. About 15 minutes to set up.
Done-for-you setup and custom features (crypto payments, dashboards, referral rewards): https://gosuoo.com/custom
Instant download (ZIP). Telegram Stars subscriptions renew every 30 days (Telegram rule). Payouts and fees follow Telegram's terms.