<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Steve Jefferson</title>
    <description>The latest articles on DEV Community by Steve Jefferson (@stevejeffersonbots).</description>
    <link>https://dev.to/stevejeffersonbots</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4214051%2Fe1a35115-288e-4078-b13e-c3e0811c5d8e.png</url>
      <title>DEV Community: Steve Jefferson</title>
      <link>https://dev.to/stevejeffersonbots</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/stevejeffersonbots"/>
    <language>en</language>
    <item>
      <title>How to charge for your Telegram bot in Python (license keys + auto-cancel with Whop)</title>
      <dc:creator>Steve Jefferson</dc:creator>
      <pubDate>Thu, 29 Oct 2026 01:40:47 +0000</pubDate>
      <link>https://dev.to/stevejeffersonbots/how-to-charge-for-your-telegram-bot-in-python-license-keys-auto-cancel-with-whop-3l85</link>
      <guid>https://dev.to/stevejeffersonbots/how-to-charge-for-your-telegram-bot-in-python-license-keys-auto-cancel-with-whop-3l85</guid>
      <description>&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;Here's the flow I ended up with:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;A customer buys on Whop, which issues a license key (you need Whop's Software Licensing app on the product).&lt;/li&gt;
&lt;li&gt;They send &lt;code&gt;/activate YOUR-KEY&lt;/code&gt; to the bot.&lt;/li&gt;
&lt;li&gt;The bot checks the key against the Whop API and locks it to their Telegram ID, so one key means one account.&lt;/li&gt;
&lt;li&gt;The bot stores paid users in a small local database and gates premium commands behind it.&lt;/li&gt;
&lt;li&gt;When someone cancels or a payment fails, Whop sends a webhook (&lt;code&gt;membership.deactivated&lt;/code&gt;) to a small FastAPI server, which removes their access.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Two things that trip people up:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;No Software Licensing app on the product means no keys are ever issued, and every activation fails.&lt;/li&gt;
&lt;li&gt;Your Whop API key needs &lt;code&gt;member:basic:read&lt;/code&gt; and &lt;code&gt;member:manage&lt;/code&gt;, the second one so the bot can lock a key to a user.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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: &lt;a href="https://whop.com/the-python-bot-monetization-kit/the-python-bot-monetization-kit-1f/" rel="noopener noreferrer"&gt;https://whop.com/the-python-bot-monetization-kit/the-python-bot-monetization-kit-1f/&lt;/a&gt; ($49 one-time).&lt;/p&gt;

&lt;p&gt;Questions welcome in the comments.&lt;/p&gt;

</description>
      <category>python</category>
      <category>telegram</category>
      <category>sideprojects</category>
    </item>
  </channel>
</rss>
