Tag: mpesa
BitMagic Releases OpenSource Mpesa PayBill API
by Idd Salim on May.21, 2011, under Coding, Personal
I was discussing with some Banking Jamaas on the money-cycle. Take for example, I want to pay fees via my mobile phone.
Currently, I need to get money from Bank-to-mPesa (KSHS 60 charge, 45 to 78 Mins if using NIC Bank), Mpesa-to-the-school-Paybill (Kshs 30 Charge), then it is paid. Simple.
But what if we eliminated Mpesa. Bank to Bank. 10-30 bob. Immediate. Via Secure Web, MobileWeb or Java. An Open inter-bank API to kill the middleman. No. Not to kill the middleman. To SAVE money for the Kenyan. MobileMoney is still too expensive. Food for thought.
But that is not the topic for today. I was honored to be at iHub leo and saw Mike Pedersen’s Pesa API [https://github.com/pluspeople/pesaPi] and I have had the opportunity to test the code line-for-line.
I thought I should write about this.
As you all know, Symbiotic was developing this API over a year ago, but our development hit a snag when Safaricom blocked our PayBill Account and Revoked our merchant licenses because we seemed to know ‘too much’ about how mPesa works.
And that was the death of www.moca.co.ke. Shame really. One-two-maybe-three people’s insecurities and flawed RAV judgement meant the death of a life-changing technology.
But today I witnessed something from heaven. Something I have been praying daily to see. SOMEONE ELSE developing code that saw my dream come to life. A publicaly available, working, object-oriented, open-source Mpesa API. And this is not just a quick-hack ‘HelloWorld’ code. It is well written code.
Get your copy today from the link above.
Have fun.
Back to code.
Wazi.
That coasto thing we did
by Idd Salim on Apr.22, 2011, under Coding, Personal
Where do I start. Kwanza gimme a few minutes to calm down this brobdingnanian erection. [frantically looking for ice-cubes or the 'sijiskii-leo-sweetie' herbal cream. Ama should I just watch an Arsenal game again. Ile ya spurs. Yes. There mzee ametulia. So, where was I]. Yes.
Herbo of VirtualCity, Mbugua, Denno of Google and Faith were my crews. And yes, tena, we rocked the place.
The ICT meetup at coast was huge. I was life from a different light. I am glad I came here. I am glad I am still here and thanks to flight delays, I am still stuck here till Wednesday. I met CEOs and CMOs and CTOs and ChiefDs. All Chiefs. Now the food is about to be served. I will use the entire easter to make sure my plates are clean. My forks are sparkling. My table is setup. No more excuses. #lessonLearnt
Equity is the Bank all developers should be looking at. That is what their presentation said. I will take up the challenge and see if they are for real. They said: ‘We have capacity and the willingness.’. This is huge. Unless the others style up, SAFARICOM and EQUITY BANK seem to be the way to go for any developer focused on Mkwanjalization. No one over the age of 4 (in terms of real-world coding experience) should be driving anything less than a Kompressor or struggling with simple bills. The time is here. The time is now. Quit ALL your jobs. Switch off your phones. No Emails. Clear your table. But only if you have the balls.
It is by eating out that one realizes that their mum DOES NOT cook the best food. Not even close. I saw this concept stretched. To both ends. Once the corporate type get drunk, their deeply hidden kijanaa gets out. #madameWakoPiwa. Once a married woman with a ring gets drunk in the Mombasa heat, their deeply hidden campo chic takes over. Married but can mingle. #chumaRasimaIrareDani. If you know worramseng. But sitasema mengi. We are just humans. #lessonLearnt.
So. Code. Yes. I did an analysis of the winners of the awards and realized one thing. I am developing 2018 Apps. So complex for the judges to award. So advanced to be understood. So I need to step down in code and logic and thinking to win something here. I put this to test last week. And, Yes. I won the 2nd and third prize in the SevenSeas impromptu Ideas Challenge. With my simplest ideas. So, Focus on the simple. Since we are all simple beings. #lessonLearnt.
In conclusion, this is the situation. Achana na everything you are doing. Start afresh tomorrow. Delete all the 13 systems you are working on. Do ONE very simple but usable system. And this is my problem right here. I don’t like doing easy or simple projects. I am too sleek for that. But these are the ones that win grants. I won’t name names, but I have seen alot of no-brainer and kindergarten systems win big grants (millions) and awards for so long, I am having to reconsider my stand on unoma. Pia mimi nitaanza kuunda systems za ushete.
Mwache excuses. Sijui government, hatuna doo, hatuna psyche. Nini, nini. Skumeni code. But simple systems.
Back to simple code…
Wazi
The unassailable panache of ‘the condom principle’
by Idd Salim on Mar.21, 2011, under Personal
My favorite movie niche is the classic save-human-race movies with wizards and arrows and swords e.g. LoTR, Conan, The Littles Hobbit, Dragon Wars etc. That notwithstanding, I am a big fan of extreme-action movies. Especially Scifis.
I vividly remember this conversation from the Alien vs Predator [Whoever wins.. we lose] movie [Alexa and Adele are in a just-formed cave whose mysterious appearance they are investigating. It was just a scientist fact-finding mission, BUT Adele had a gun.].
Alexa: “Seven seasons on the ice, and I’ve never seen a gun save someone’s life.”
Adele: “I don’t plan on using it.”
Alexa: “Then why bring it?”
Adele: “Same principle as a condom. I’d rather have one and not need it, than need it and not have one.”
And this convo always males my day.
So, with time, this became my age-old mantra. But I related it to knowledge. #sipendiSex
When it comes to knowledge, In the modern time and era, it is far much better and more rewarding to be a Jack of all trades and a master of a few, if any, than to be a jack of nothing and master of one.
As an entrepreneur, thence cometh the dilemma. Do you specialize in a few and be a master of them, or do you learn bits about most of the lot? After the dilemma, thence cometh the question. Specialize in a few ‘what’. You want to code, thus a few languages, Do you want to be a DBA, hence a few Databases. Do you want to be a hacker, hence a few tools, tricks and methods? etc?
Personally, I believe (being trained as a coder who can hack and manage databases as well as configure networks, servers and routers. ) one needs to be an TechnoSlut to be able to survive as a budding or maturing outfit. As a techie, you need to know a little about everything. When it comes to getting things done, you can now confidently recruit and VET for the best candidates for what you need, or learn more. Hiring is always better. But you can’t personally hire the best unless you know WHAT to look for, and what they should know.
A newspaper plant general manager must know how to source for the best paper. What the best printers are. What the best content (day-based) is. What the best distribution models would be. What the best revenue streams are. A little bit of everything. Better know it and never use the knowledge, than be in need of the knowledge and be ignorant.
This presents a problem, however. How do you learn about everything, albeit bits, and still be productive.
My way – The big-picture-mode:
You need to decide on a big project. Do your own twitter or mPesa. Am mPesa clone for example, will force you to do the following:
- N-tier programming.
- Databases (Optimization, Redundancy, High-Availability)
- Programming (Concurrent Multi-threaded, load-balanced)
- Interfaces (STK, Web Technologies [Ajax, PHP/C#, SSL, Your own CA])
- Learn ISO8583 (for ATMs and POS).
- Reporting – Accounting, isolated reporting, end-user customization.
- Tools : Apache/IIS (whince), PHP/C# (.NET), memCached.
So, clearly, challenging yourself to re-do an existing BIG SYSTEM has many benefits as it throws you to the deep-end of technology. It took me about 3 months to develop an mPesa clone, but the time spent is wayyyy well worth it. You see development from a new level. Am eagle’s eye-view.
Back to code…
Wazi.
ZeroDay : Mpesa Syntax Change + Of Man U
by Idd Salim on Feb.14, 2011, under Coding, Personal

Courage - Of Man U - See Below
Hmmn,
I wasn’t planning to blog this week, but I just received an mPesa from UK and it seems Mpesa SMSes Confirmation receipt has changed. The receipt no longer contain the Comma Thousand Separator. Amount now comes to the sender and recipient as Ksh78000 instead of Ksh78,000.
This affects SMSes from mPesa UK (via Western Union). Not Kenyan-originated Mpesas.
For the payment gateway/aggregator developers who use Mpesa SMS Confirmations as a way of recording payments (A very risky and insecure model, cringe!), make sure you are not parsing for the Comma.
Obviously, to avoid this from affecting your code, you can always replace the comma whether it exists or not, and make your insecure code future-proof.
End of!
Err, ngoja. Ball kiasi kwanza before ni-vamoose.
About Football
We all know the big game of the week. The Mighty Arsenal vs Barcelona (The Spanish Softies). Last time Messi aling’ara because there was no Song in midfield and the Defence has expired defenders (Sol and Sylvestre). In attack, we had a moody hit-or-miss Bendtner, with his pink gay boots that always make Scholes get a boner. Barca wakitushinda roundi hii, nitakubali. No excuses this time round.
We now have a better setup. We have is an on-form RvP, Cesc, Nasri and a better defense. I predict a 2-1 Arsenal win. Then a draw on March 8.
Speaking of 2-1 (Not the Wolves vs Man Ushoga 2-1), but the 2-1 result in the Manchester Derby last weekend. Giving credit where and when it is due, I salute Wayne Rooney for his goal. It was a dumb and career threatening move for such a fat person to jump so high just to score. But it worked! At least, he now feels how Arshavin feels everyday. Since he does that everyday. Not once in-a-blue-moon.
I stopped a Man U fan on his tracks after the game had ended, as he rushed home to put on his Man U Jersey (they always wear the jerseys after the game – after they win) and asked him to explain why All Man U fans do that. Why they wear Caltex, Protex and Safaricom shirts during the game, but put on a Man U shirt after the game. He answered : “Unajua most Man U Jerseys are Nylon. So you can’t wear Nylon for long. You must wait for the game to end, then wear it. Otherwise it smells.”, And I was elightened.
Back to code…
Wazi





