It was 3 p.m. on a Friday when my client’s e-commerce site had a conversion issue.
“Arthur, our customers are abandoning carts because the ‘Pay with Card’ option isn’t working for them,” the client groaned. “Half of Kenya uses M-Pesa. Why don’t we?”
He was right. Over 80% of Kenyan adults use mobile money, yet his site relied on card payments. After a weekend of caffeine-fueled coding, we integrated M-Pesa—and saw conversions jump by 40% in a week.
Here’s how you can do it too.
Step 1: Set Up Safaricom Daraja API
1.Register for a Daraja Account
Visit Safaricom Developer Portal.
Create a test app to access sandbox credentials (Consumer Key, Consumer Secret).