Secure M-Pesa STK Push callback handler for hotspot billing system — built to receive and process payment confirmations via Safaricom Daraja API.
# Medents M-Pesa Callback Handler
This project provides a secure backend endpoint for receiving and processing M-Pesa STK Push payment confirmations via Safaricom's Daraja API. It is designed to integrate with a MikroTik-based Wi-Fi hotspot billing system, enabling automated user login and session activation upon successful payment.
---
## 🚀 Features
- ✅ Listens for M-Pesa payment callbacks at `/callback`
- ✅ Responds with `ResultCode: 0` to confirm receipt
- ✅ Logs transaction payloads for verification
- ✅ Built with Node.js and Express
- ✅ Deployable on Render.com for free HTTPS hosting
---
## 🔧 Setup Instructions
### 1. Clone the Repository
```bash
git clone
github.com
cd medents-mpesa-callback