The Problem
In Kenya, over 90% of rent payments happen via M-Pesa (mobile money). But most landlords still reconcile these payments manually — downloading M-Pesa statements, matching transactions to tenants in Excel, and spending 8-12 hours/month on what should be automated.
I'm building HomeManager to solve this.
The Technical Stack
- Backend: Django + Django REST Framework
- Frontend: React (web) + React Native (mobile)
- Payments: Safaricom M-Pesa Daraja API (STK Push + C2B)
- Infrastructure: AWS (ECS, RDS, S3, CloudFront)
- Task Queue: Celery + Redis
- AI: Claude API + AWS Bedrock for natural language queries
M-Pesa Integration Architecture
The most interesting technical challenge: automatic payment reconciliation.
When a tenant pays rent via M-Pesa Paybill:
- Safaricom sends a C2B callback to our API
- We extract the account number from the transaction
- Match it to a tenant's unit
- Apply payment to their oldest unpaid invoice
- Send SMS receipt instantly
- Update the dashboard in real-time
The tricky part? Account numbers. Tenants type them inconsistently — "A12", "a12", "A 12", "Apt 12" should all match to the same unit. We built fuzzy matching logic that handles this.
Automated Invoice Generation
Every 1st of the month, a Celery beat task:
- Queries all active leases
- Generates invoices with rent + utilities (water, garbage)
- Calculates water charges from meter readings
- Applies any carried-forward balances
- Sends SMS/email notifications to tenants
Late Fee Automation
The system:
- Checks daily for invoices past grace period
- Calculates fee (percentage, fixed, or both)
- Adds as a line item on the invoice
- Respects configurable caps (tenant protection)
- Won't double-charge (idempotent)
This removes the landlord from the "bad guy" equation — it's the system enforcing what the lease says.
Lessons Building SaaS in East Africa
- SMS > Email. Most tenant communication is SMS. Email open rates are <20% in this market.
- Mobile-first everything. Property managers do meter readings on-site from phones.
- Offline matters. Internet isn't always reliable. Cache critical data.
- M-Pesa is not Stripe. Powerful API but inconsistent documentation.
- Multi-currency from day one. We support KES, UGX, TZS, RWF.
What's Next
- WhatsApp Business API integration
- Smart meter reading via OCR
- Predictive analytics for vacancy forecasting
If you're building fintech or proptech for emerging markets, I'd love to connect.
Platform: homemanager.buniva.co.ke
Company: buniva.co.ke
Full comparison of property management software in Kenya: buniva.co.ke/blog/best-property-management-software-kenya.html
Top comments (0)