- 🔐 User registration with hashed passwords
- 💰 Wallet management (funding and balance tracking)
- 🔁 Peer-to-peer (P2P) transactions between users
- 💳 PayPal integration using REST API and SDK
- 📜 Transaction logging with type and status
- 🗄️ PostgreSQL backend using SQLAlchemy ORM
- ✅ Data validation using Pydantic
- 🧾 Jinja2 templates + static file support
- 🔑 Password hashing with Passlib (bcrypt)
Method | Endpoint | Description |
---|---|---|
POST | /users/register |
Register a new user |
POST | /wallets/fund |
Fund wallet using PayPal |
POST | /create-order |
Create PayPal order (REST API) |
POST | /capture-order/{order_id} |
Capture PayPal order |
GET | /payment/success |
Callback for successful payment |
GET | /payment/cancel |
Callback for canceled payment |
POST | /transactions/p2p |
Transfer funds to another user |
POST | /webhook |
PayPal webhook listener |
GET | / |
Basic HTML UI using Jinja2 templates |
- 🧾 Use PayPal sandbox credentials for all test transactions.
- Ensure environment variables like
PAYPAL_CLIENT_ID
andPAYPAL_CLIENT_SECRET
are set in your.env
file.
- Backend: FastAPI
- Payment Integration: PayPal REST API & SDK
- Database: PostgreSQL
- ORM: SQLAlchemy
- Authentication: Passlib (bcrypt)
- Templating: Jinja2
- Validation: Pydantic