You built a useful Telegram bot. People use it. You'd like a few of them to pay. That's usually where it stops, because billing is the boring, risky part.
Here's the flow I ended up with:
- A customer buys on Whop, which issues a license key (you need Whop's Software Licensing app on the product).
- They send
/activate YOUR-KEYto the bot. - The bot checks the key against the Whop API and locks it to their Telegram ID, so one key means one account.
- The bot stores paid users in a small local database and gates premium commands behind it.
- When someone cancels or a payment fails, Whop sends a webhook (
membership.deactivated) to a small FastAPI server, which removes their access.
Two things that trip people up:
- No Software Licensing app on the product means no keys are ever issued, and every activation fails.
- Your Whop API key needs
member:basic:readandmember:manage, the second one so the bot can lock a key to a user.
Run the bot, the webhook server and background jobs as one process, and it deploys cleanly to Railway, Render or a VPS behind a reverse proxy.
I packaged all of this, plus three ready-to-run templates (crypto tracker, group concierge, WhatsApp Cloud starter) and a 5-module guide, into a kit: https://whop.com/the-python-bot-monetization-kit/the-python-bot-monetization-kit-1f/ ($49 one-time).
Questions welcome in the comments.
Top comments (0)