4 min read

I Built a Telegram VPN Bot in One Day Using INFOCROSS Partner API: Technical Walkthrough

I'm a backend developer. When I first looked at INFOCROSS's Partner API documentation, my immediate reaction was: this is genuinely interesting. Not a fake 'API' that's just a referral link — an actual REST API that creates subscriptions, returns VLESS keys, and exposes webhooks. I spent one day building a minimal working Telegram bot. Here's the complete technical walkthrough.

build telegram vpn bot apivpn reseller telegram botinfocross partner api developervpn api integrationVLESS Reality VPNTelegram VPN botINFOCROSS VPN

Key takeaways

I'm a backend developer. When I first looked at INFOCROSS's Partner API documentation, my immediate reaction was: this is genuinely interesting. Not a fake 'API' that's just a...
The article is published in the INFOCROSS blog, uses a stable URL, and is included in sitemap.xml.
The article is published in the INFOCROSS blog, uses a stable URL, and is included in sitemap.xml.

Overview

I'm a backend developer. When I first looked at INFOCROSS's Partner API documentation, my immediate reaction was: this is genuinely interesting. Not a fake 'API' that's just a referral link — an actual REST API that creates subscriptions, returns VLESS keys, and exposes webhooks. I spent one day building a minimal working Telegram bot. Here's the complete technical walkthrough.

What the Partner API Actually Provides

After registering at infocross.info/partners and receiving API credentials, you get access to a REST API at https://api.infocross.info/v1. Authentication: Bearer token in Authorization header.

The endpoints that matter for a VPN bot

  • POST /v1/subscriptions — create subscription for a user, returns VLESS key and QR URL
  • GET /v1/subscriptions/{id} — check status, expiry date, days remaining
  • POST /v1/subscriptions/{id}/renew — extend subscription by one period
  • GET /v1/plans — list available plans with partner pricing
  • GET /v1/servers — list available server regions
  • POST /v1/webhooks — register webhook URL for subscription events (expiry warnings, etc.)

The response from POST /v1/subscriptions includes: subscription_id, vless_key (the full vless://... string), qr_url (hosted QR code image), expires_at, and plan details. Everything a bot needs to deliver VPN access to a customer.

A minimal viable VPN bot needs

  • Telegram bot (aiogram for Python, telegraf for Node.js)
  • Payment handling (Telegram Stars, CryptoBot, or SBP/card via payment gateway)
  • INFOCROSS API client (simple HTTP calls)
  • Database (SQLite for a start — user_id → subscription_id mapping)
  • Webhook receiver (for expiry notifications)

I chose Python + aiogram 3.x + aiohttp + SQLite + CryptoBot for payment. Total lines of code for working version: 287. Here's the actual flow.

plans = await infocross.get_plans() # GET /v1/plans

kb = InlineKeyboardBuilder()

for plan in plans

kb.button(

callback_data=f"plan_{plan['id']}"

)

Step 2: Payment (via CryptoBot)

@router.callback_query(F.data.startswith('plan_'))

async def handle_plan_select(callback: CallbackQuery)

plan_id = callback.data.split('_')[1] # Create CryptoBot invoice invoice = await cryptobot.create_invoice( asset='USDT',

description='INFOCROSS VPN Subscription'

)

reply_markup=payment_button(invoice.pay_url)

)

# Store in database

db.save_subscription(user_id, sub['subscription_id'])

# Send key to user

await bot.send_message(

user_id,

f'Expires: {sub["expires_at"][:10]}'

)

await bot.send_photo(user_id, sub['qr_url'],

caption='Scan this QR code in Hiddify or v2rayNG')

The INFOCROSS API Client Class

class InfocrossAPI

BASE = 'https://api.infocross.info/v1'

def __init__(self, api_key: str)

self.headers = {'Authorization': f'Bearer {api_key}'}

async def create_subscription(self, plan_id: str,

'server_region': server_region}) as r

return await r.json()

headers=self.headers) as r

return await r.json()

Expiry Reminders via Webhook

Register a webhook URL with INFOCROSS: POST /v1/webhooks with your server's public URL. INFOCROSS will POST to your webhook 3 days before each subscription expires, with payload containing subscription_id and expires_at.

Your webhook handler sends the user a renewal reminder with a payment button. Automate renewals entirely: if you store a payment method, auto-charge and auto-renew via the /renew endpoint.

Business Model: The Numbers

MetricValue
INFOCROSS partner price (example)€0.80/month per device
Your retail price€2.00/month
Margin per subscriber€1.20/month

What's Not in This Walkthrough (Production Requirements)

  • Rate limiting: don't create duplicate subscriptions for the same payment
  • Error handling: what if INFOCROSS API is temporarily unavailable
  • Key rotation: handling when INFOCROSS updates server keys
  • Support flow: /help command that routes to your support channel
  • Admin panel: view all subscribers, total revenue, churn rate
  • Multiple server regions: let users choose EU, US, Asia servers

A production-ready bot is 2–4 weeks of work for one developer. The minimal version above is one day.

✅ Bottom Line

INFOCROSS Partner API is a real REST API — POST /subscriptions returns VLESS keys. Minimal Python bot: 287 lines, one day of development. Business case: €1.20 margin per subscriber/month, €300/month at 250 subscribers. Register at infocross.info/partners.

How INFOCROSS fits this use case

INFOCROSS VPN combines Telegram payment flow, VLESS Reality key delivery, QR setup, dashboard access, partner API, and support in one product. That makes it useful for individual users, families, Telegram communities, and projects that need reseller automation.

Related articles

Article FAQ

Can search engines index this vpn api integration article?

Yes. It is published as a regular server-rendered INFOCROSS blog page, included in sitemap.xml, has no noindex directive, and uses a canonical infocross.info URL.

What does “I Built a Telegram VPN Bot in One Day Using INFOCROSS Partner API: Technical Walkthrough” help with?

The article explains a practical VLESS Reality and Telegram key-delivery use case: setup, limitations, comparisons, payments, and common configuration mistakes.