Connect Stripe to Telegram by associating a paying customer with an immutable Telegram user ID, then granting access only after Stripe confirms payment. Use a bot to issue a controlled invitation and remove the same identity when the membership entitlement ends.
A permanent invite sent after every payment is not a complete integration. It can be forwarded, it may stay usable after cancellation, and it does not reliably identify who should be removed later.
Separate billing, identity and access
Single-use bot deep link → Telegram numeric user ID
↓
Stripe Checkout → verified payment → active entitlement
↓
expiring join-request invitation
↓
approve only the entitled user ID
Stripe answers whether the purchase is paid. Your entitlement policy answers whether access should exist now. Telegram reports whether the person is currently in the protected chat. Separate records make failures diagnosable and retries safe.
Set up a private community and shared Memberalia bot
Create a private Telegram channel for publishing or a private group for discussion. Add @MemberaliaBot as an administrator with invitation and removal permissions. In Memberalia, click Connect Telegram and use the secure connection link to select and verify your community.
Record the numeric chat ID rather than a username. Keep the token secret: anyone with it may be able to operate the bot. Memberalia encrypts saved tokens and offers a reconnect flow for rotation. Its webhook endpoint validates a separate secret before accepting bot updates.
The official Telegram Bot API documents the invitation, membership and join-request methods. Do not request extra administrative powers merely to make setup easier.
Connect the creator’s Stripe account
Create a Memberalia workspace, verify your email and connect an eligible Stripe Standard account. Create the membership plan on that connected account, then map it to the Telegram community.
The customer’s payment goes to the creator’s Stripe account. Memberalia charges the creator a separate fixed software subscription. There is no Memberalia transaction commission, but Stripe processing charges still apply.
For your own integration, Stripe Connect subscription documentation explains account-scoped billing. Keep creator products, customers and prices on the same connected account.
Use a one-use identity token
When the customer starts joining, generate a high-entropy token with a short expiry. Store a hash of it, bind it to the pending membership attempt, and send the customer to a bot deep link.
https://t.me/YourCommunityBot?start=SHORT_LIVED_TOKEN
The customer must press Start in the private bot chat. The webhook atomically consumes the token and stores from.id, the numeric Telegram identity. Do not trust a username supplied by a browser or a screenshot of a profile.
Expiry and single use solve different problems. Expiry limits how long a leaked token is useful. Atomic consumption prevents two requests from claiming the same token. Bind the token to its workspace and community as well, so it cannot link a payment in another tenant.
Grant access after verified payment
Stripe Checkout redirects are useful for the interface, but the signed webhook is the payment confirmation. Verify the raw-body signature and deduplicate the event ID before updating the subscription and entitlement.
For Telegram, Memberalia generates a short-lived join-request invitation rather than a permanently reusable link. When a request arrives, it checks the Telegram user ID against a valid entitlement for that community. A forwarded link from a different identity is declined.
After successful approval, the invitation is revoked. If the link expires before joining, the member can request synchronization again from the membership page. This is clearer and safer than creating a permanent workaround link.
Renew, cancel, remove and rejoin
A successful renewal retains access. A failed renewal starts the default three-day grace period; repeated failures do not extend the same deadline. A cancellation scheduled for period end keeps access through that paid date.
When access ends, the bot removes the numeric user ID from the protected community. A future valid membership can unban that identity and issue a fresh invitation. The bot needs to retain its administrative permissions for both actions.
Periodic reconciliation checks actual membership against current entitlements. It should never approve a user merely because an old “grant” job is still in the queue; every retry must reread the desired state.
Before publishing your link
Run a successful payment, renewal, failed payment, cancellation and rejoin with ordinary member identities. Forward an invitation to a second account and verify it is not approved. Reuse the identity token and verify it cannot be claimed again. Temporarily remove a bot permission and check the remediation message.
See Stripe Telegram automation for the product flow, Telegram memberships for setup, and the fee calculator for a transparent cost estimate.