Open to engineering roles and client projects
Work / For an organisation / Prepaid Water Vending
Case study · For an organisation

Prepaid Water Vending.

M-Pesa payments become prepaid meter tokens and SMS delivery, with retries when a vending request fails.

RoleSoftware Developer; payment integration, queued vending and AWS deployment
ForWater vendors and their customers · Amsol Africa
TimelineDec 2025 – ongoing
StackDjango, Celery, PostgreSQL, React, Daraja
StatusLive · login required
From payment to water
  1. M-Pesa paymentDaraja confirms the customer payment.
  2. Meter tokenA queued job requests the token, with retries if needed.
  3. SMS deliveryThe token is sent to the customer for their meter.
50+meters vended since January
0tokens issued by hand
1meter per customer, enforced
The problem

Water vendors were collecting prepaid payments and issuing meter tokens by hand. Customers waited, tokens went to the wrong meters, and nobody could reconcile payments against water sold.

What I built

M-Pesa in, meter token out, SMS delivered.

I built the payment-to-vending workflow using Django, Celery, PostgreSQL and React. M-Pesa Daraja confirms the payment, a worker requests the Stronpower meter token, and the customer receives it by SMS. I also implemented retries and deployment to AWS EC2 through GitHub Actions.

Architecture

Every vend is a background job that retries.

M-Pesa confirmation callbacks queue a Celery task that asks Stronpower for a token and sends it by SMS. Failures retry with exponential backoff, and credentials are encrypted in the database.

Key decisions

Choices that made it hold up.

  • Retry with exponential backoff

    If Stronpower or the SMS gateway is slow, the vend retries on a growing delay instead of failing.Why: a paid customer must always get a token

  • One meter, one customer

    The system refuses to link a meter to two customers.Why: tokens were reaching the wrong meters

  • Encrypt vendor credentials

    Stronpower and M-Pesa credentials are encrypted at rest per client.Why: many vendors share one platform

Evidence

Production usage and reliability mechanisms

CheckWhat it doesResult
Production usagePrepaid water meters served by the platform115+ meters vended since January 2026
Failed requestsVending retries through background jobsExponential backoff implemented
DeploymentGitHub Actions deploys the applicationAWS EC2
What's next

Usage alerts and leak detection from meter readings.

Contact

An engineering role or a project to build?

Share the opportunity or the problem you need solved. I usually reply within a day with questions, an approach or a time to talk.

Phone+254745600377
Based inNairobi, Kenya · working worldwide
What do you need?
You can also mention a budget in your preferred currency below.