A modular payments system designed for merchants to process transactions seamlessly. Inspired by Hyperswitch, this system offers multi-organization support, secure transactions, and an event-driven architecture.
- Features
- Tech Stack
- Installation
- Usage
- API Reference
- Architecture
- Development
- Contributing
- Roadmap
- License
- Contact
✅ Multi-merchant support
✅ Secure and encrypted transactions
✅ Event-driven architecture using Kafka/RabbitMQ
✅ Role-based access control (RBAC)
✅ Webhook support for real-time notifications
✅ Multi-currency support
✅ API-first design with REST & GraphQL
✅ Modular architecture for easy extensibility
✅ Built-in audit logging
- Backend: Python (FastAPI, SQLModel, SQLAlchemy)
- Database: PostgreSQL / SQLite (for local development)
- Message Queue: Kafka / RabbitMQ
- Authentication: OAuth2, JWT
- Infrastructure: Docker, Kubernetes
- Logging & Monitoring: Prometheus, Grafana
- Frontend: React (for the merchant dashboard)
- Python 3.10+
- PostgreSQL
- Docker (optional, for containerized setup)
- Redis (for caching and queueing)
-
Clone the repository:
git clone https://github.com/your-org/payments-system.git cd payments-system
-
Install dependencies:
pip install -r requirements.txt
-
Set up environment variables:
cp .env.example .env
Edit
.env
and provide necessary configurations. -
Run the database migrations:
alembic upgrade head
-
Start the server:
uvicorn app.main:app --reload
To test the API, run:
curl -X GET http://localhost:8000/health
Or access the interactive API docs:
- Swagger UI: http://localhost:8000/docs
- Redoc: http://localhost:8000/redoc
Example API endpoints:
POST /auth/login
Request Body:
{
"email": "[email protected]",
"password": "securepassword"
}
Response:
{
"access_token": "jwt_token_here",
"token_type": "bearer"
}
POST /transactions/
Request Body:
{
"amount": 1000,
"currency": "USD",
"merchant_id": "uuid_here",
"payment_method": "credit_card"
}
The system follows a modular, event-driven architecture:
.
├── app/
│ ├── accounts/
│ ├── payments/
│ ├── notifications/
│ ├── transactions/
│ ├── database/
│ ├── common/
│ ├── main.py
├── migrations/
├── tests/
├── Dockerfile
├── README.md
pytest tests/
flake8 .
black .
We welcome contributions! Please check out our Contributing Guide.
- Implement webhook event subscriptions
- Add support for Apple Pay and Google Pay
- Enhance fraud detection with ML models
This project is licensed under the MIT License - see the LICENSE file for details.
For questions and support, reach out to:
- Email: [email protected]
- Discord: Join our community