PayFlow is a production-style payment processing backend built with FastAPI, PostgreSQL, and event-driven architecture.
The system demonstrates real-world financial engineering concepts:
- Idempotent payment processing
- Transaction consistency and ACID guarantees
- Retry handling for transient failures
- Reconciliation workflows
- Secure authentication
- Event-driven processing with Kafka
- Cloud-native deployment patterns
payment.created payment.validated payment.processed payment.settled payment.failed payment.reconciled
The system demonstrates real-world financial engineering concepts:
- Idempotent payment processing
- Transaction consistency and ACID guarantees
- Retry handling for transient failures
- Reconciliation workflows
- Secure authentication
- Event-driven processing with Kafka
- Cloud-native deployment patterns
Payment workflow events: payments ↓ payment_attempts ← retry/attempt tracking
payments ↓ idempotency_key ← duplicate-payment protection
FastAPI ↓ PostgreSQL/payflow ↓ CRUD/API endpoints ↓ Kafka events ↓ Redis/cache ↓ Celery/background processing
-
POST /initiate-payment→ Idempotent payment creation using unique request keys -
GET /payment-status/{payment_id}→ Real-time tracking of transaction state
- Retry mechanism with exponential backoff
- Safe handling of transient failures
- Idempotency guarantees to prevent duplicate charges
POST /reconcile→ Batch process to detect and fix inconsistent or failed transactions
- JWT-based authentication
- Secure password hashing (Passlib)
- RBAC-ready architecture
- Structured logging for traceability
- Metrics-ready design for monitoring systems
Client | v FastAPI API Gateway | v Payment Service | +---- PostgreSQL (ACID Transactions) | +---- Kafka Event Bus | +---- Redis Cache | +---- Celery Workers | +---- Monitoring / Logging
Payment lifecycle events:
payment.created | v payment.validated | v payment.processing | v payment.completed
Failure scenarios:
payment.failed payment.retry payment.reconciled
- Clean separation of concerns (API → Service → DB)
- Stateless, scalable API design
- Transaction-safe operations with rollback support
- Fault isolation and recovery mechanisms
- Designed idempotent APIs to ensure safe retries
- Implemented ACID-compliant transactions for financial consistency
- Built retry logic with exponential backoff for resilience
- Modeled domain entities: accounts, payments, audit logs
- Structured backend for horizontal scalability
- Backend: Python, FastAPI
- Database: PostgreSQL
- Auth: JWT, Passlib
- Infrastructure: Docker, Docker Compose
- Cloud Ready: AWS (Lambda, SQS, RDS) / GCP (Cloud Run, Pub/Sub)
backend/
├── api/ # Route handlers
├── core/ # Config, security, utilities
├── models/ # SQLAlchemy models
├── schemas/ # Pydantic schemas
├── services/ # Business logic layer
├── db/ # DB session management
└── main.py
git clone https://github.com/ManibalaSinha/enterprise-transaction-platform.git
cd enterprise-transaction-platformdocker-compose up --build- API → http://localhost:8000
- Swagger → http://localhost:8000/docs
POST /initiate-payment{
"amount": 100,
"currency": "USD",
"idempotency_key": "abc123"
}{
"payment_id": "uuid",
"status": "pending"
}- Supports high-throughput transaction systems
- Designed for horizontal scaling and high-throughput transaction processing.
- Stateless services enable horizontal scaling
- Ready for queue-based async processing (SQS / PubSub)
- Stripe webhook integration (real payment gateway)
- Event-driven architecture (Kafka / PubSub)
- Rate limiting & throttling
- Fraud detection layer
- Admin dashboard & analytics
- CI/CD with automated testing
This project demonstrates:
- Real-world payment system design
- Strong understanding of distributed system challenges
- Backend expertise in FastAPI + PostgreSQL
- Production-ready thinking (reliability, consistency, scaling)
a system built for real financial workflows
Manibala Sinha Senior Backend Engineer | Python | FastAPI
GitHub: https://github.com/ManibalaSinha
=======
PayFlow is a production-style payment processing backend built with FastAPI, PostgreSQL, and event-driven architecture.
The system demonstrates real-world financial engineering concepts:
- Idempotent payment processing
- Transaction consistency and ACID guarantees
- Retry handling for transient failures
- Reconciliation workflows
- Secure authentication
- Event-driven processing with Kafka
- Cloud-native deployment patterns
payment.created payment.validated payment.processed payment.settled payment.failed payment.reconciled
The system demonstrates real-world financial engineering concepts:
- Idempotent payment processing
- Transaction consistency and ACID guarantees
- Retry handling for transient failures
- Reconciliation workflows
- Secure authentication
- Event-driven processing with Kafka
- Cloud-native deployment patterns
Payment workflow events: payments ↓ payment_attempts ← retry/attempt tracking
payments ↓ idempotency_key ← duplicate-payment protection
FastAPI ↓ PostgreSQL/payflow ↓ CRUD/API endpoints ↓ Kafka events ↓ Redis/cache ↓ Celery/background processing
-
POST /initiate-payment→ Idempotent payment creation using unique request keys -
GET /payment-status/{payment_id}→ Real-time tracking of transaction state
- Retry mechanism with exponential backoff
- Safe handling of transient failures
- Idempotency guarantees to prevent duplicate charges
POST /reconcile→ Batch process to detect and fix inconsistent or failed transactions
- JWT-based authentication
- Secure password hashing (Passlib)
- RBAC-ready architecture
- Structured logging for traceability
- Metrics-ready design for monitoring systems
Client | v FastAPI API Gateway | v Payment Service | +---- PostgreSQL (ACID Transactions) | +---- Kafka Event Bus | +---- Redis Cache | +---- Celery Workers | +---- Monitoring / Logging
Payment lifecycle events:
payment.created | v payment.validated | v payment.processing | v payment.completed
Failure scenarios:
payment.failed payment.retry payment.reconciled
- Clean separation of concerns (API → Service → DB)
- Stateless, scalable API design
- Transaction-safe operations with rollback support
- Fault isolation and recovery mechanisms
- Designed idempotent APIs to ensure safe retries
- Implemented ACID-compliant transactions for financial consistency
- Built retry logic with exponential backoff for resilience
- Modeled domain entities: accounts, payments, audit logs
- Structured backend for horizontal scalability
- Backend: Python, FastAPI
- Database: PostgreSQL
- Auth: JWT, Passlib
- Infrastructure: Docker, Docker Compose
- Cloud Ready: AWS (Lambda, SQS, RDS) / GCP (Cloud Run, Pub/Sub)
backend/
├── api/ # Route handlers
├── core/ # Config, security, utilities
├── models/ # SQLAlchemy models
├── schemas/ # Pydantic schemas
├── services/ # Business logic layer
├── db/ # DB session management
└── main.py
git clone https://github.com/ManibalaSinha/enterprise-transaction-platform.git
cd enterprise-transaction-platformdocker-compose up --build- API → http://localhost:8000
- Swagger → http://localhost:8000/docs
POST /initiate-payment{
"amount": 100,
"currency": "USD",
"idempotency_key": "abc123"
}{
"payment_id": "uuid",
"status": "pending"
}- Supports high-throughput transaction systems
- Designed for horizontal scaling and high-throughput transaction processing.
- Stateless services enable horizontal scaling
- Ready for queue-based async processing (SQS / PubSub)
- Stripe webhook integration (real payment gateway)
- Event-driven architecture (Kafka / PubSub)
- Rate limiting & throttling
- Fraud detection layer
- Admin dashboard & analytics
- CI/CD with automated testing
This project demonstrates:
- Real-world payment system design
- Strong understanding of distributed system challenges
- Backend expertise in FastAPI + PostgreSQL
- Production-ready thinking (reliability, consistency, scaling)
a system built for real financial workflows
Manibala Sinha Senior Backend Engineer | Python | FastAPI
GitHub: https://github.com/ManibalaSinha <<<<<<< HEAD
5bdfaff (payment protected) c0b0d70 (Order)





