<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: brian ambeyi</title>
    <description>The latest articles on DEV Community by brian ambeyi (@brian_ambeyi_533afa8e6873).</description>
    <link>https://dev.to/brian_ambeyi_533afa8e6873</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4009683%2Fde6f004c-05e7-4847-af75-2ed3d315c980.png</url>
      <title>DEV Community: brian ambeyi</title>
      <link>https://dev.to/brian_ambeyi_533afa8e6873</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/brian_ambeyi_533afa8e6873"/>
    <language>en</language>
    <item>
      <title>Building PropTech for East Africa: M-Pesa Rent Automation</title>
      <dc:creator>brian ambeyi</dc:creator>
      <pubDate>Tue, 30 Jun 2026 13:44:08 +0000</pubDate>
      <link>https://dev.to/brian_ambeyi_533afa8e6873/building-proptech-for-east-africa-m-pesa-rent-automation-4ln6</link>
      <guid>https://dev.to/brian_ambeyi_533afa8e6873/building-proptech-for-east-africa-m-pesa-rent-automation-4ln6</guid>
      <description>&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;I'm building &lt;a href="https://homemanager.buniva.co.ke" rel="noopener noreferrer"&gt;HomeManager&lt;/a&gt; to solve this.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Technical Stack
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Backend:&lt;/strong&gt; Django + Django REST Framework&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Frontend:&lt;/strong&gt; React (web) + React Native (mobile)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Payments:&lt;/strong&gt; Safaricom M-Pesa Daraja API (STK Push + C2B)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Infrastructure:&lt;/strong&gt; AWS (ECS, RDS, S3, CloudFront)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Task Queue:&lt;/strong&gt; Celery + Redis&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AI:&lt;/strong&gt; Claude API + AWS Bedrock for natural language queries&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  M-Pesa Integration Architecture
&lt;/h2&gt;

&lt;p&gt;The most interesting technical challenge: automatic payment reconciliation.&lt;/p&gt;

&lt;p&gt;When a tenant pays rent via M-Pesa Paybill:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Safaricom sends a C2B callback to our API&lt;/li&gt;
&lt;li&gt;We extract the account number from the transaction&lt;/li&gt;
&lt;li&gt;Match it to a tenant's unit&lt;/li&gt;
&lt;li&gt;Apply payment to their oldest unpaid invoice&lt;/li&gt;
&lt;li&gt;Send SMS receipt instantly&lt;/li&gt;
&lt;li&gt;Update the dashboard in real-time&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;h2&gt;
  
  
  Automated Invoice Generation
&lt;/h2&gt;

&lt;p&gt;Every 1st of the month, a Celery beat task:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Queries all active leases&lt;/li&gt;
&lt;li&gt;Generates invoices with rent + utilities (water, garbage)&lt;/li&gt;
&lt;li&gt;Calculates water charges from meter readings&lt;/li&gt;
&lt;li&gt;Applies any carried-forward balances&lt;/li&gt;
&lt;li&gt;Sends SMS/email notifications to tenants&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Late Fee Automation
&lt;/h2&gt;

&lt;p&gt;The system:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Checks daily for invoices past grace period&lt;/li&gt;
&lt;li&gt;Calculates fee (percentage, fixed, or both)&lt;/li&gt;
&lt;li&gt;Adds as a line item on the invoice&lt;/li&gt;
&lt;li&gt;Respects configurable caps (tenant protection)&lt;/li&gt;
&lt;li&gt;Won't double-charge (idempotent)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This removes the landlord from the "bad guy" equation — it's the system enforcing what the lease says.&lt;/p&gt;

&lt;h2&gt;
  
  
  Lessons Building SaaS in East Africa
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;SMS &amp;gt; Email.&lt;/strong&gt; Most tenant communication is SMS. Email open rates are &amp;lt;20% in this market.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Mobile-first everything.&lt;/strong&gt; Property managers do meter readings on-site from phones.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Offline matters.&lt;/strong&gt; Internet isn't always reliable. Cache critical data.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;M-Pesa is not Stripe.&lt;/strong&gt; Powerful API but inconsistent documentation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multi-currency from day one.&lt;/strong&gt; We support KES, UGX, TZS, RWF.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  What's Next
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;WhatsApp Business API integration&lt;/li&gt;
&lt;li&gt;Smart meter reading via OCR&lt;/li&gt;
&lt;li&gt;Predictive analytics for vacancy forecasting&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you're building fintech or proptech for emerging markets, I'd love to connect.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Platform: &lt;a href="https://homemanager.buniva.co.ke" rel="noopener noreferrer"&gt;homemanager.buniva.co.ke&lt;/a&gt;&lt;/em&gt;&lt;br&gt;
&lt;em&gt;Company: &lt;a href="https://buniva.co.ke" rel="noopener noreferrer"&gt;buniva.co.ke&lt;/a&gt;&lt;/em&gt;&lt;br&gt;
&lt;em&gt;Full comparison of property management software in Kenya: &lt;a href="https://buniva.co.ke/blog/best-property-management-software-kenya.html" rel="noopener noreferrer"&gt;buniva.co.ke/blog/best-property-management-software-kenya.html&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>proptech</category>
      <category>saas</category>
      <category>fintech</category>
      <category>africa</category>
    </item>
  </channel>
</rss>
