A secure RESTful API for wallet operations with role-based access control
/user/register
Register new user
/user/update
Update user (Admin)
/user/all-users
List all users (Admin)
/user/all-agents
List all agents (Admin)
/wallet/add
Add money (Agent)
/wallet/withdraw
Withdraw money (User)
/wallet/transfer-money
Transfer money (User)
/wallet/all-wallet
All wallets (Admin)
/wallet/my-wallet
My wallet (User/Agent)
/trans/all-transactions
All transactions (Admin)
/trans/your-transactions
My transactions (User)
/com/all-agent-com
All commissions (Admin)
/com/agent-com
My commissions (Agent)
PORT=5000 DB_URL=mongodb+srv://<user>:<password>@cluster0.mongodb.net/<dbname> NODE_ENV=development # JWT Configuration JWT_ACCESS_SECRET=digital_wallet JWT_ACCESS_EXPIRES=1d JWT_REFRESH_SECRET=your_refresh_secret JWT_REFRESH_EXPIRES=7d # Session EXPRESS_SESSION_SECRET=express-session