Telegram Bot for Payments and Receipts (aiogram). Code + Guide Telegram Bot for Payments and Receipts (aiogram). Code + Guide
Telegram Bot for Payments and Receipts (aiogram). Code + Guide
Telegram Bot for Payments and Receipts (aiogram). Code + Guide

Telegram Bot for Payments and Receipts (aiogram). Code + Guide

Sold <10
0 000 X
There are no such quantities in stock
By clicking the button, you agree to terms for buyers
Secure deal
Instant delivery

Product description

A client opens the bot, picks products or services from the catalog, adds them to a cart and pays for the order — by card via Telegram Payments or by manual transfer to your payment details. After payment the bot sends a receipt on its own: text, an image and a PDF. The admin sees today´s orders and statistics in /admin and confirms manual transfers with one button. All orders live in SQLite — no external databases or subscriptions.

The catalog, prices and payment details all live in one file, config.py: changing a product or a price is a single line, no code changes needed. Amounts of orders already created are stored in the database and never change when the catalog is edited.

One order means one payment and one receipt: a second payment for the same order is blocked by the logic, and no second document is created. Before charging, Telegram sends a pre-checkout query — the bot checks that the order exists, is unpaid and the amount matches, and only then confirms the payment. A manual transfer counts as paid only after the admin presses «Confirm» in /admin; if no money arrived, the admin rejects the payment and the order reopens.

WHAT´S INSIDE THE ARCHIVE
• bot.py — aiogram 3 bot: catalog, cart, checkout, Telegram Payments invoice, manual transfer, receipts, /admin
• keyboards.py — buttons: catalog, product, cart, payment methods, my orders, admin panel
• payments.py — logic without Telegram: cart, totals, orders, payment statuses, receipt text, admin statistics
• db.py — SQLite storage: catalog, orders, order items, receipts
• receipt.py — receipt as a PNG image and as a PDF
• config.py — product catalog, texts, settings from .env
• .env.example — sample settings: bot token, provider token, transfer details, admins
• requirements.txt, payments-bot.service, run.sh — dependencies, VPS service, one-command launcher
• test_payments_bot.py — automated logic tests, no live Telegram needed
• README.md and PDF — full guide: setup, BotFather, card payments, transfers, receipts, deploy

GUIDE STEPS
1. Create a bot with @BotFather, get your ID from @userinfobot → .env.
2. Enter your products and prices in config.py, one line per product.
3. Transfer details — MANUAL_PAYMENT_DETAILS in .env.
4. ./run.sh — the bot answers /start.
5. Test order: catalog → cart → payment → receipt.
6. Card payments: provider token from BotFather → PROVIDER_TOKEN.
7. On a VPS: a systemd service keeps the bot running.

WHAT YOU NEED
Python 3.10+ on a computer or VPS and a bot token from @BotFather. For card payments — a provider token from BotFather. 10 minutes.

HONEST LIMITS
The bot is NOT an online cash register and does NOT replace fiscalization under Russian law 54-FZ: its «receipts» are payment-confirmation slips (text, image, PDF), not fiscal receipts. For official fiscalization you need a fiscal data operator (FDO) and an online cash register: connect an FDO separately and issue fiscal receipts through its API or dashboard. Do not present the bot´s slip as a fiscal receipt. No discounts, promo codes or partial payments in v1.0. A manual transfer is confirmed by a human: until the admin presses «Confirm», the order counts as unpaid. Amounts are in whole rubles. Without a provider token card payments are unavailable — the card button is hidden and only manual transfer remains.

IMPORTANT
These are files and a guide for self-setup — not a done-for-you installation. If you need the bot installed on your server turnkey, that´s a separate service.

SIMILAR PRODUCTS
• Telegram Booking Bot with Slot Calendar on aiogram: /itm/telegram-booking-bot-with-slot-calendar-on-aiogram-code-guide/6432381
• Telegram Cafe Bot: Menu, Cart and Orders on aiogram 3: /itm/telegram-cafe-bot-menu-cart-and-orders-on-aiogram-3-code-guide/6423674
• WireGuard Bot: Issue VPN Configs to Your Team from Telegram: /itm/wireguard-bot-issue-vpn-configs-to-your-team-from-telegram-code-guide/6429337
• n8n: Payment and Renewal Reminder Bot for Clients: /itm/n8n-payment-and-renewal-reminder-bot-for-clients-workflow-guide/6432377
• Telegram Lead Bot on aiogram 3: Business Card + Request Form: /itm/telegram-lead-bot-on-aiogram-3-business-card-request-form-code-guide/6423255
• Telegram bot on VPS with systemd — autostart and logs: /itm/telegram-bot-on-vps-with-systemd-autostart-restart-logs-templates-guide/6410458

Main features

  • Content type File
  • Content description 69,15 kB
  • Updated on the site 23.11.2026

Images

Reviews

No reviews yet

0 000 X
There are no such quantities in stock
By clicking the button, you agree to terms for buyers
Telegram Bot for Payments and Receipts (aiogram). Code + Guide
1 Sold <10
0 000 X
Secure deal
Instant delivery

You viewed

All images, logos, and names of games, programs, and other products used are taken from public sources and are for informational purposes only. All trademarks, logos, names, and other intellectual property belong to their respective owners. Use of such images on the website does not imply any affiliation or connection with the copyright holders.