globall.dev - Telegram bot studio globall.dev
Subscriptions and payments

Subscription VPN: automated payments and access provisioning

Telegram bot plus a site with a personal account that sells access, writes off renewals automatically and issues VLESS keys without the participation of the owner. This is the studio's own product - Globall VPN.

Niche: VPN by subscription Type: Bot + website + Mini App Stack: Python · Aiogram · FastAPI · MySQL
24/7
Payment and automatic key issuance without owner
3
Payment methods payment gateway: cards, bank transfers, digital wallet
VLESS
Keys are generated via the 3x-ui panel API
2
Entry channel: Telegram bot and website
Problem

Selling VPNs manually is a full-time job

Any subscription VPN runs into the same wall: each payment requires manual actions. The client sends a check - you need to check it, create a key on the server, send the config, write down the end date. A month later, everything repeats: remember who needs to renew, write a new invoice, don’t forget to disconnect those who haven’t paid.

As long as there are a dozen users, this is tolerable. On a hundred, it means night shifts at the phone: keys get confused, renewals are lost, and each new client waits for access for hours instead of seconds. A service that should generate passive income turns into a 24-hour operator shift.

We needed this for our own studio product - Globall VPN. Therefore, the task was honest and tough: to build a service that sells, issues and renews itself, and the owner connects only when he wants.

Approach

Scoping: where there is money, there is automation first

We divided the service into three circuits and automated them according to the priority of cash flow - first, what directly affects revenue and retention.

  1. Money. Payment and recurring auto debits are the main thing. If the renewal is not written off on its own, the service again requires manual labor. Therefore, billing was designed first: tariff fork, webhook processing of payment statuses, cron for auto-renewal.
  2. Access. Issuing and revoking VLESS keys via the 3x-ui panel API. The payment is completed - the key is created and given to the client in seconds; subscription has expired - access is closed automatically.
  3. Growth and management. A referral system, a mandatory subscription to channels for a bonus and an admin panel so that the owner could intervene manually, but was not obliged to do so.

Two entry channels were laid out immediately: Telegram bot for those who live in the messenger, and a full-fledged website with a personal account for those who are used to the web. Both work with the same database and the same payment logic - the user does not feel the difference.

Solution

What ultimately works

The result was a self-sustaining service consisting of two storefronts and a common engine.

Purchase funnel

A new user goes through onboarding: selects a device and immediately receives free trial key - this removes the barrier “will it work at all.” Then select a tariff (1, 3 or 12 months), pay by card, via bank transfers or digital wallet directly inside Telegram via WebApp - without going to the browser. The payment is confirmed by a webhook, and the key is issued automatically.

Renewals without owner participation

This is the heart of the service. Subscription is made from recurrent auto write-off: a cron task on the desired day itself debits money for the next period through the saved payment method payment gateway. If the user buys additional months - leftovers are summed up, and do not burn out. The client does nothing; the service just continues to work.

Access and its closure

VLESS keys are created and managed via the external panel API 3x-ui. Payment has been completed - the key is active; subscription has expired without renewal - access is revoked automatically. No “forgot to disconnect the defaulter.”

Website and personal account

Works in parallel with the bot website: registration by email or via Google OAuth, personal account, web admin. FastAPI backend with JWT authorization and SMTP mail verification. You can have a live showcase open here.

Growth and retention

Referral system accrues bonus days for the first payment of an invitee - users refer users. Middleware mandatory subscription to channels with caching, it gives out bonus days for subscriptions and gently retains the audience. A admin panel gives the owner complete control: mailings to everyone or by segment, user management, manual issuance and withdrawal of subscriptions, replies to messages - in case you still want to intervene.

Technically

Under the hood

Payment and recurring billing

payment gateway: cards, bank transfers, digital wallet
Three payment methods with webhook processing of statuses: the payment is confirmed and the issuance script starts automatically.
Recurrent auto write-offs
Cron tasks write off fees for the next period using the saved method - renewal without client action.
Payment within Telegram
Telegram WebApp for payment directly in the bot - the user does not go to the browser.
Tariffs 1 / 3 / 12 months
Several tariffs with auto-renewal and summation of balances upon additional payment.

Access and key issuance

VLESS control via 3x-ui
Creation and management of VPN keys via the 3x-ui external panel API - issuing and revoking access on the fly.
Onboarding with a trial key
Selecting a device and automatically issuing a trial key immediately upon startup—zero barrier to entry.

Growth, retention, management

Referral system
Automatic accrual of bonus days for the first payment of an invited user.
Middleware channel subscriptions
Mandatory subscription with verification caching and bonus days for subscribing to channels.
Admin panel
Mailings to everyone and by segment, user management, manual issuance and withdrawal of subscriptions, replies to messages.
Cron for auto debits
Background tasks check subscriptions and write off recurrent renewals according to a schedule.

Web service and infrastructure

Website with personal account
Registration by email and via Google OAuth, personal account and web admin panel - the second showcase for the bot.
FastAPI + JWT + SMTP
FastAPI backend with JWT authorization and email verification via SMTP.
MySQL: 6 data domains
Users, subscriptions, keys, referrals, payments and devices - a single base for the bot and the site.
Python + Aiogram
Bot on Aiogram, a common layer of logic with the web part - one payment and subscription mechanics for both channels.
Python FastAPI MySQL Aiogram + WebApp payment gateway Google OAuth 3x-ui / VLESS
Result

A service that works itself

At the exit - self-sustaining service: payment, automatic issuance of VLESS keys and recurring renewal work without the owner 24/7. The client buys access and receives a working key in seconds; renewals are written off themselves; defaulters are automatically disconnected. The owner logs into the admin area when he wants to intervene, and not because he has to.

This is not a demo prototype - it's live product, on which we ourselves test what we then build for clients: recurring billing, webhook payment processing, automatic access issuance. Open showcase: vpn.globall.dev, bot - @GloballVPN_bot.

Revenue and retention metrics for this service are private and are provided upon request for a specific project, without fictitious numbers.

If you need the same “payment → auto-issue → auto-renewal” circuit for your niche - be it a VPN, access to a private channel, subscription software or any digital product - this is exactly the mechanics that we assemble on a turnkey basis.

Do you want a service that sells and renews itself?

Tell us about the product - we will send you a fixed estimate and deadlines the day before. Subscriptions, payments, automatic access and admin - we collect it on a turnkey basis, the source code is yours from day one.

For free. I will answer within an hour during business hours. No spam.

We take on a limited number of projects at the same time - this keeps deadlines realistic.

IP Geolocation by DB-IP