A production-ready example project demonstrating aiopayme integration with FastAPI, aiogram, SQLAlchemy, and Payme payment system.
- aiopayme — Payme integration
- FastAPI — REST API
- aiogram — Telegram bot
- SQLAlchemy — ORM
- Alembic — migrations
- sqladmin — admin panel
git clone https://github.com/aiopayme/example
cd examplecp .env.example .envFill in your credentials in .env:
BOT_TOKEN=your_bot_token
MERCHANT_ID=your_merchant_id
SECRET_KEY=your_secret_key
SANDBOX=True
DATABASE_URL=sqlite+aiosqlite:///./db.sqlite3
ONE_TIME_PAYMENT=Truedocker-compose up --buildpip install -r requirements.txt
alembic upgrade head
python main.py # FastAPI + admin panel
python bot/main.py # Telegram bot├── admin/
│ └── admin.py # sqladmin views
├── bot/
│ └── main.py # Telegram bot
├── handlers/
│ └── payme.py # Payme webhook handlers
├── migrations/ # Alembic migrations
├── models/
│ ├── order.py # Order model
│ └── payme.py # PaymeTransaction model
├── routers/
│ ├── order.py # Order creation endpoint
│ └── webhook.py # Payme webhook endpoint
├── services/
│ └── payme.py # Payme business logic
├── deps.py # Dependencies
├── main.py # FastAPI entrypoint
└── settings.py # Configuration
Available at http://localhost:8000/admin
Full aiopayme documentation at aiopayme.github.io