Flow Preview
Paid Access SignupPayment FulfillmentMembership Status CheckMembership Access Audit
Overview
Sell paid private club access with Telegram Payments, Stripe, YooKassa, or another provider; invite paid members to a separate Telegram group or channel; and prepare an audit flow for access checks.
Who It's For
The user wants a bot that accepts payment for private Telegram group or channel access and controls access after payment. The bot is an access gate, not the club or community content itself.
Setup Requirements
- Which payment provider should be used: Telegram Payments, Stripe, YooKassa, or another provider?
- What is the Stripe recurring Price ID for the membership plan?
- Which separate Telegram group, supergroup, or channel should paid members access?
- How often should subscription status be checked (Stripe variant)?
- Telegram Payments (default): in @BotFather, open your bot's Payments settings, connect a supported payment provider, copy the provider token, and paste it in FlowCastle under Bot Settings > Card payments (provider token). The payment step is already an ACCEPT_PAYMENT block with paid/not-paid branches using Telegram Stars (XTR); switch it to Card once the provider token is set. Automatic membership auditing requires Stripe, so the weekly audit is not installed with Telegram Payments — handle renewals and removals manually or choose Stripe.
- Before testing checkout, fill the secret variable STRIPE_SECRET_KEY in the Stripe module setup.
- Stripe API keys docs: https://docs.stripe.com/keys
- To enable payment fulfillment, add the webhook endpoint in Stripe Dashboard. Open the "Payment Fulfillment" flow, select the Start webhook block, copy the Full Webhook URL, and paste it into Stripe Developers > Webhooks.
- Stripe: keep the Stripe module installed, set STRIPE_SECRET_KEY, use a real recurring Price ID, configure the payment webhook, and test one subscription checkout before inviting members. Stripe is the only variant that installs the automatic weekly membership audit; if you switched to Stripe after installing with another provider, re-create the audit broadcast manually.
- YooKassa: install the YooKassa module (yokassa@1.0.0) and add your shopId and secretKey in the module setup form — the payment action reads credentials from the module, so they are not stored in the flow. The payment step is prewired to create YooKassa payment links. Renewals are manual, and the automatic membership audit is not installed (it requires Stripe).
- Other provider: replace the payment placeholder step with that provider's module action or HTTP request, map payment id/status/link outputs into variables, and add a webhook or manual confirmation path before granting Telegram access. The automatic membership audit is not installed (it requires Stripe).
- Checkout redirect (Stripe/YooKassa): the setup question fills both checkoutSuccessUrl and checkoutCancelUrl with the same page; edit the variables later if you want separate success and cancel pages.
- For Telegram invite generation and member removal, add the bot as an administrator in the target channel or group with permission to invite users and manage members.
- Target Chat can be a public Telegram link like https://t.me/privateclub, a username like @privateclub, or a numeric -100 chat ID.
- To get alerted about every new paid member, tag your team contacts with the "owner" tag on the Contacts page. The Notify owner action then messages everyone carrying that tag with the member email, subscription id, and contact.
Node Breakdown
- Start in the paid access signup flow
- Collect a receipt email before checkout or invoice
- Use the payment variant selected in setup: Telegram invoice, Stripe subscription checkout, YooKassa payment link, or provider placeholder
- Send a payment link or Telegram invoice
- Use a provider webhook/paid branch for payment completion when the selected provider supports it
- Gate invite creation on the captured payment status; non-paid webhook events are recorded silently
- Create a one-person Telegram group/channel invite link for paid members
- Store payment/subscription ids, invite_link, and membership status on contact variables
- Stripe variant: use a separate membership status check flow for recurring audits
- Stripe variant: create a draft recurrent broadcast that runs the membership status check flow
- Stripe variant: remove members from the Telegram group/channel and notify them when the subscription is no longer active
Details
Good to know
- The payment_provider briefing answer selects one setup variant inside this same template: Telegram Payments, Stripe, YooKassa, or another provider placeholder.
- Use moduleActionRef for stripe@1.0.0 templateKey create-subscription-checkout-session when the Stripe variant is selected.
- Use moduleActionRef for stripe@1.0.0 templateKey retrieve-subscription in the recurring membership check flow when the Stripe variant is selected.
- The membership audit machinery (recurring broadcast + retrieve-subscription + remove-chat-member) is installed only in the Stripe variant. Telegram Payments, YooKassa, and other providers cannot verify subscription state automatically, so the audit is omitted there and the Membership Status Check flow is installed empty.
- The Payment Fulfillment flow gates invite creation on the captured payment status; non-activation events are recorded silently into lastPaymentEventAt instead of sending an invite.
- Use telegram@1.0.0 create-chat-invite-link after payment and remove-chat-member when group/channel access is no longer paid.
- For Telegram remove-chat-member user_id, use {{sysvar|platformId}} for the current contact or broadcast recipient; do not create an empty contact variable for the Telegram user ID.
- Use the Stripe stripe-payment-events-webhook trigger template for payment fulfillment when the Stripe variant is selected.
- Use the YooKassa payment-link action and webhook template when the YooKassa variant is selected; renewals are manual unless separate recurring billing is added. YooKassa shopId and secretKey live in the module setup form, not in the flow.
- For create_broadcast, use the current applicationId and selected Telegram botId; data.flowId is the broadcast flow placeholder.
- Keep the recurring broadcast as a draft with create_recurrence_schedule and attach_recurrence_to_broadcast.
Keep in mind
- Do not add users to a Telegram group or channel before the selected provider confirms payment.
- Do not use a normal reusable invite link for paid access; create a limited invite link per paid member.
- Do not model recurring audits as a normal message chain; use a recurrent broadcast draft.
- Do not build the community, news, events, or content experience itself; keep that inside the separate Telegram group or channel.
