A clean, production-ready Telegram bot for selling digital content (links, files, text) via Telegram Stars (XTR).
- ✅ Native Stars Payment: Zero third-party providers, uses
currency="XTR". - ✅ Flexible Delivery: Support for links, plain text (keys/codes), and files.
- ✅ Clean Code: No dead features, focused entirely on the payment -> delivery flow.
- ✅ Production Ready: Env-based config, error logging, and simple deployment.
Create a .env file:
BOT_TOKEN=вашь_токен_из_botfather
STARTUP_NAME=TopPromptBotEdit bot/core/config.py. Add your products to the PRODUCTS dictionary:
"my_product": {
"title": "Cool Guide",
"price": 50,
"delivery_type": "links", # or "file", "text"
"content": ["https://example.com"] # or "file/path.pdf" or "Secret Key"
}pip install -r requirements.txt
python main.pyThis bot is ready for Railway, Render, or VPS.
- Railway/Render: Just connect the repo. It uses the included
Procfile. - VPS: Use
systemdto runpython main.py.
main.py: Entry point.bot/core/config.py: Product catalog and settings.bot/commands/payment.py: Stars payment and delivery logic.locales/en/messages.ftl: UI text and templates.
Built with ❤️ using aiogram 3.x