Auto-remove expired members from a paid Telegram group: the 3 cases bots get wrong

How to remove expired members from a paid Telegram group automatically, and the 3 cases bots get wrong: failed cards, banned rejoins and people already inside.

On this page

To remove expired members from a paid Telegram group automatically, you need a bot that is an administrator of the group, reads the status of each subscription from your payment processor, and removes the member when that subscription truly ends. Telegram itself has no setting for it. Most bots handle the easy case, a member who cancels. Members are lost, or keep free access, in three other cases: a card that fails, a member who comes back after removal, and people who were in the group before the bot. This guide shows how each case should work, how to check your own setup, and how to build it yourself if you prefer code.

It is written for tipsters, signal sellers, coaches and anyone selling a private Telegram channel or group by subscription. Every fact about Telegram and Stripe links to its source, checked December 5, 2026.

How automatic removal works on Telegram

Every automatic removal follows the same chain. The member pays through a checkout, the payment processor (Stripe, for most bots) creates a subscription, and a bot that is an administrator of your channel or group watches that subscription. When it ends, the bot removes the person.

The removal itself is one Bot API call, banChatMember. Telegram only accepts it from a bot that is "an administrator in the chat" with the appropriate rights (Telegram Bot API, banChatMember). That is why every subscription bot asks you to promote it to admin, and why removing a bot from the admins ends its power over the group.

What separates a good setup from a bad one is not the call. It is when the bot decides a subscription has ended, how it removes, and who it decides to remove.

CaseWhat a careless bot doesWhat should happen
Card fails at renewalRemoves on the first failed chargeKeeps access while the processor retries; removes when the subscription ends
Member pays again after removalLeaves them banned, the new link failsRemoves without a lasting ban; a fresh link works
People inside before the botRemoves everyone without a recordTouches only members it sold access to
Invite link sharedOne open link, reused by anyoneOne link per buyer, for one person, expiring

Case 1: the card that fails

A renewal fails for dull reasons: an expired card, a limit reached, a bank blocking an unfamiliar charge. The member did not decide to leave. If the bot removes them on that first failure, you lose a paying member over a technical problem, and they find out from the group disappearing.

Stripe is built to recover these payments. With Smart Retries, "for new Stripe accounts, Stripe enables Smart Retries by default and configures it for up to 8 retries within 2 weeks" (Stripe Docs, Automate payment retries). During that time the subscription is past_due: payment on the latest invoice "either failed or wasn't attempted", and the subscription keeps creating invoices (Stripe Docs, How subscriptions work).

What happens after the last retry is your choice, in Billing > Revenue recovery > Retries in the Stripe Dashboard (Stripe Docs, Automate payment retries):

Setting after the final retrySubscription statusWhat it means for the member
Cancel the subscriptioncanceledOver for good; they subscribe again to come back
Mark the subscription as unpaidunpaidInvoices are still created, but Stripe stops trying to collect
Leave the subscription past-duepast_dueStays in limbo; a bot that grants access on past_due keeps them in
Pause the subscriptionpaused (if eligible)No charges until resumed

For a paid group, "Cancel the subscription" is the clean end: the subscription becomes canceled, "a terminal state that can't be updated" (Stripe Docs, How subscriptions work), and any bot reading Stripe sees one clear signal. "Leave the subscription past-due" is the setting to avoid: the member can keep access for weeks without paying.

How Sublaunch handles it. While Stripe retries a failed payment, the member keeps their access. The bot removes them when the subscription ends. Removal never depends on someone checking a spreadsheet.

Case 2: the member who comes back

The second case shows up a week later. A member is removed, pays again, gets a new invite link, and the link does not work.

The cause is in Telegram's documentation. A member removed with banChatMember alone "will not be able to return to the chat on their own using invite links, etc., unless unbanned first" (Telegram Bot API, banChatMember). A bot that bans and stops there has blocked a paying customer from your group. You then unban them by hand, one by one, after a support message.

The right removal is two calls: banChatMember to take the person out, then unbanChatMember with only_if_banned set to true. Telegram says that after an unban the user "will not return to the group or channel automatically, but will be able to join via link" (Telegram Bot API, unbanChatMember). The only_if_banned flag matters: without it, calling unbanChatMember on someone still in the group removes them.

How Sublaunch handles it. When a subscription ends, @sublaunchbot removes the member from every channel and group they had through that Sublaunch. Removed, never banned: they can subscribe again and get a new link. A returning member reopens the access in their Access tab and receives a fresh private link.

Case 3: the people who were already inside

The third case hurts the most, because it hits your best people: lifetime buyers, friends, moderators, members who paid you by bank transfer before you had a bot, members moving over from another tool.

A bot can decide who to remove in two ways:

  • Only its own expired members. It keeps a list of who it sold access to, and removes a person when their subscription in that list ends. Everyone else is left alone.
  • Everyone it has no record of. It checks the members of the group, at join time or in a regular sweep, and removes whoever is not on its list.

The second way protects against people who slip in through a leaked link, but it removes everyone you added by hand, unless you whitelist each one. It also makes two bots in one group impossible: each removes the other's buyers. We covered that trap in detail in switching from InviteMember.

Telegram does not tell a bot about joins by default: to receive chat_member updates, "the bot must be an administrator in the chat and must explicitly specify" them in its allowed updates (Telegram Bot API, Update). A bot that removes people at join time chose to.

How Sublaunch handles it. People already in the channel before Sublaunch stay. Sublaunch's bot does not act when someone joins; it only removes Sublaunch members whose subscription ended. Lifetime members you move from another tool can be added by hand and will never be removed.

Before connecting any bot to a group that already has members, ask its support or read its help for one sentence: does it remove only its own expired members, or anyone it has no record of?

Removal only works if people cannot walk back in. A single invite link posted on your sales page, or sent to every buyer, can be shared in another group, and anyone with it joins.

Telegram's createChatInviteLink has two settings that close this: member_limit, the number of people who can join through the link (1 to 99 999), and expire_date, the moment the link stops working (Telegram Bot API, createChatInviteLink). A link with a member limit of 1 that expires soon after it is sent is useless to anyone but the buyer.

How Sublaunch handles it. After paying, the member opens the access in their Access tab and @sublaunchbot sends them a private invite link: one person, valid one hour. Lost it? They reopen the access and get a new one, while their subscription is active. For leaks that already happened, revoke the old link in Telegram and stop posting it anywhere.

How to check the bot you use today

Five tests take an afternoon and a second Telegram account. Run them before your next renewal day:

  1. Failed card. Subscribe with a Stripe test card that declines at renewal, in test mode if your tool has one. Check that access stays during the retry period.
  2. Retry outcome. Open Billing > Revenue recovery > Retries in Stripe and pick what happens after the final retry. Prefer "Cancel the subscription".
  3. Cancel and return. Cancel the test subscription, wait for the removal, then subscribe again. The new link must let you back in.
  4. Hand-added member. Add your second account to the group by hand, without paying. Wait a day. It should still be there.
  5. Link reuse. Open the invite link from the first test account, then try it from another. The second join should fail.

If a test fails, fix the setting or change the tool before you grow the group. Every member you add makes a wrong removal more expensive.

Build it yourself: the minimum that works

If you write code, a do-it-yourself version is small. The minimum:

  1. Create the bot with @BotFather and make it an administrator of the group, with the right to ban users and invite users via link.
  2. Listen to Stripe webhooks: customer.subscription.updated and customer.subscription.deleted. Store each subscription's status next to the buyer's Telegram user ID.
  3. On payment, call createChatInviteLink with member_limit: 1 and an expire_date an hour away, and send the link to the buyer privately.
  4. When the status becomes canceled (or unpaid, if you chose that setting), call banChatMember, then unbanChatMember with only_if_banned: true.
  5. Retry failed removals. Telegram calls fail sometimes (the bot lost its rights, the user already left). Log every failure and retry on a schedule, or someone keeps access.
  6. Never sweep the whole group. Remove only user IDs that your own records say have expired.

The hard part is not this code. It is everything around it: linking a Telegram account to a payment, renewals, refunds, members who change cards, and support when a link expires. That is the work a subscription tool does for you.

Doing it with Sublaunch

Sublaunch handles the three cases above without code:

  1. Add @sublaunchbot as an admin of your channel or group, with Telegram's default permissions.
  2. Post the code Sublaunch gives you as a message in the group, then press Connect.
  3. Set your prices. Members pay by card, Apple Pay or Google Pay, into your own Stripe account.

From then on, each buyer gets a one-person invite link valid one hour, keeps access while a failed payment is retried, and is removed (never banned) when their subscription ends. People who were inside before stay. One Sublaunch can open several channels and groups, each for the tiers you choose; when a member changes tier, they lose what the new tier does not open. See the Telegram integration for the details.

Sublaunch's Starter plan is free, with a 15% fee on each sale, plus Stripe's processing fees (Sublaunch llms.txt). Free trials, coupons, lifetime access and an affiliate program are on every plan. For every way to sell a Telegram channel and what each one costs, read 7 ways to sell access to a private Telegram channel. Selling to a WhatsApp group instead? The same rules apply in how to run a paid WhatsApp group.

FAQ

Can Telegram remove members automatically when a subscription expires?

Not on its own for groups you sell with your own checkout. Telegram has no setting that reads a payment and removes the member. A bot that is an administrator of the group does it, using the Bot API's banChatMember call when the subscription ends in your payment processor, such as Stripe.

Should I remove a member as soon as a payment fails?

No. A failed renewal is often an expired card or a bank block, not a decision to leave. Stripe retries failed payments, up to 8 times in 2 weeks by default on new accounts. Keep access during that period, remind the member to update their card, and remove them only when the subscription ends.

Why can't a removed member rejoin after paying again?

They were banned, not just removed. Telegram says a user removed with banChatMember cannot return through invite links until unbanned. A good bot calls unbanChatMember with only_if_banned right after the removal, so the member can come back with a new link once they pay again.

Will a subscription bot remove people I added by hand?

It depends on the bot. Some only remove their own members whose subscription ended; others remove anyone they have no record of, at join time or in a regular check. Sublaunch only removes its own expired members, so lifetime buyers and people added by hand stay.

Sources9
  1. Telegram Bot API, banChatMember, checked December 2026.
  2. Telegram Bot API, unbanChatMember, checked December 2026.
  3. Telegram Bot API, createChatInviteLink, checked December 2026.
  4. Telegram Bot API, Update (chat_member), checked December 2026.
  5. Stripe Docs, Automate payment retries, checked December 2026.
  6. Stripe Docs, How subscriptions work, checked December 2026.
  7. Stripe Docs, Testing, checked December 2026.
  8. Sublaunch, product overview for AI assistants (llms.txt), plans and fees.
  9. Sublaunch, Telegram integration, how @sublaunchbot adds and removes members.
Share this article
Written by

SublaunchAI builds creators' pages, paid access and members' area on Sublaunch. It writes these guides from public sources and Sublaunch's own product, and Julien Levallois reviews them.

Reviewed by Julien Levallois