When the crowdfunding non-profit Kiva.org launched a pilot in 2014 to streamline their transactions in Kenya, they met local shop owners like Esther, who was running a stall called “Facebook Cereals.” Kenya had suffered political unrest in recent years, and Esther had to restart her business in the Toi Market of Nairobi twice. But she kept her smile.
“When you go to Facebook, you get everything. You get friends and you find a mix of everything. Similarly, in my cereal shop you get everything, all mix of cereals: rice, wheat, maize, cassava, millet, beans, etc. And they are all connected,” she explained.
Kiva’s mission is to support economic opportunity for people like Esther by crowdfunding microloans. The object of the Kenya pilot was to deploy a platform for interacting with mobile payment systems, remove extraneous digital intermediaries and learn what was needed to scale operations across the country.
Rather than counting on funds to trickle top-down, from a government or a large NGO to small businesses, Kiva facilitates transactions between individual lenders and borrowers that help build developing economies from the ground up.
Visitors to Kiva.org pick a borrower they want to support with a loan as small as $25 dollars. These individual loans are collected until that borrower’s full loan request is crowdfunded. Esther had lenders supporting her from around the world, such as Anders from Sweden, loaning her money to keep Facebook Cereals going.
Transferring money from multiple lenders to a borrower seems simple on paper, but like most things software, when put it into the developing world, things get complicated fast. Infrastructure is often not dependable, edge cases are abundant and local customs create unique challenges for engineering teams to mitigate.
A country’s technological infrastructure will always change over time, so Kiva has to decide when to build software themselves or tie into local APIs and services. Kiva chief technology officer Kevin O’Brien recently said the company has been pulling back the endpoints of their transaction systems. “It’s quite a challenge to develop a financial codebase that can deal with all the edge cases,” he said. “You’re constantly trying to build new ways to map how the money flows.”
“Stop Assuming and Instead Adapt”
Safaricom — one of Africa’s largest telecom providers — played a central role in Kiva’s Kenya pilot. It runs M-Pesa, a Kenyan mobile network that facilitates payment via SMS. Shop vendors and consumers use the M-Pesa backbone to facilitate transactions the way many use PayPal or Venmo, and the Kiva team set up an M-Pesa bulk account where they transfer the loan funds and from which the borrowers then withdraw.
Borrowers paid back their loans into that bulk account, and Kiva paid back Safaricom for transaction fees. “They have infrastructure that can disperse small transactions very easily,” said.
The Economist once called M-Pesa “by far the most successful scheme of its type on earth.” In many ways, Kenya has been ahead of the Western world for some time when it comes to digital payments. Millions of people live in rural areas and physical cash can be both cumbersome and dangerous to carry, making digital transfers an attractive alternative.
Shop vendors and consumers use the M-Pesa backbone to facilitate transactions the way many use PayPal or Venmo, and the Kiva team set up an M-Pesa bulk account where they transfer the loan funds and from which the borrowers then withdraw.
While M-Pesa is incredibly efficient way to facilitate money transfers, it can create havoc for IT teams. M-Pesa changes rapidly, and those changes can bring processes like Kiva’s to a grinding halt.
In one instance, some borrower repayments were no longer showing up in Kiva’s system with a ‘Completed’ status as expected. Upon inquiring, Safaricom confirmed system problems, but assured they were indeed authorized and completed — so it shouldn’t be a problem.
“Well, sure not a problem for them, but an issue for us where we had assumed a certain state,” O’Brien said. “Whether it was phone numbers, payment states, or just about anything else with our work in Kenya, we realized over time to stop assuming and instead adapt to what came our way.”
What was coming their way on a typical day? Unannounced changes to the API. M-Pesa often changed file formats for the data necessary to disperse and fulfill loans. “The changes would be really small, too,” added Patel. “M-Pesa would add a currency sign or move a column in their file formats.” That would change Kiva’s ability to read the files or return information correctly, which caused hiccups in load disbursement and complaints to flood customer service.
Local Customs, Local Expectations
In the pilot, Kiva validated both loan parties by their cell number, but people in Kenya change phone numbers often with fluid SIM cards. Some users had five numbers; they’d use one for one loan and another for a second. That caused confusion for users, many of whom aren’t literate, and the Kiva customer service team.
Then there’s the question of the confirming the correct recipient, not just to prevent theft, but to stay in compliance with Kenya’s financial regulations. M-Pesa runs kiosks where users can pick up their loans as cash. It seems obvious to a Westerner that the loan recipient is the only person who could collect it, but not so in a country far more oriented around communal businesses managed by entire families.
“We have to ensure the money gets in the right hands,” Patel said. “But we run into all these scenarios. Families often run businesses together, but that doesn’t mean that dad’s allowed to accept a loan on behalf of his daughter. It must be her number on the other end of the transaction.”
A Creative Engineering Approach
Kiva cites its flat engineering organizational structure as the reason they are able to focus on creative solutions to multiple hurdles at once in developing countries like Kenya (80+ countries, in fact.)
“Rather than forcing people into specialized roles, we promote the idea that any engineer can solve any of the problems we need to solve,” O’Brien said. “We may end up working on things we know best, but get a chance to participate in the process of choosing and designing what to work on. That’s really important for ensuring that we believe in the solutions we put in place and collectively own the code we put out in the world.”.
This culture also promotes agility when facing unpredictable issues, such as currency frequently in flux. Kiva covers a certain portion of losses due to conversion and partners cover another, but O’Brien said when lenders and borrowers receive their financial statements, there are still usually discrepancies. Sometimes that loss will be the difference of a penny. But Kiva’s teams still figure out the error. “You spend much more than a penny’s worth of time to solve the problem,” O’Brien noted.
Scaling technology in the developing world comes with big questions about government stability, economic turmoil and resilience of infrastructure, but as better infrastructure comes online in the developing world, those hiccups will happen less and less, which will let their small businesses grow and grow. And according to Patel, the troubleshooting is worth it: during the pilot, Kiva reached more than 7,000 small business owners in Kenya with about 10,000 loans, totaling about 100 million Kenyan shillings or about $1 million USD.
Change is the only constant, so individuals, institutions, and businesses must be Built to Adapt. At Pivotal, we believe change should be expected, embraced and incorporated continuously through development and innovation, because good software is never finished.