DEV Community

Cover image for The Unfortunate Reality of Global Payment Platforms
pretty ncube
pretty ncube

Posted on

The Unfortunate Reality of Global Payment Platforms

The Problem We Were Actually Solving

Our users were getting frustrated with failed transactions, and our support team was overwhelmed with complaints. We knew we needed to find an alternative, but the options seemed limited. We'd tried integrating multiple payment gateways, only to encounter more problems than solutions. It seemed like we were stuck between a rock and a hard place – either compromise on our users' payment experience or give up on serving the African market altogether.

What We Tried First (And Why It Failed)

We initially attempted to use a combination of local payment gateways like Interswitch and Paystack, but they had serious limitations. For instance, Interswitch's API was finicky, and Paystack's fees were prohibitively high. We also tried using online marketplaces like Payhip, but they imposed unfair revenue sharing models that left us with a fraction of the revenue we deserved. In hindsight, we were trying to force square pegs into round holes – we were attempting to solve a problem that required a fundamentally different approach.

The Architecture Decision

After much deliberation, we decided to roll our own payment processing system using the Mojito framework and a PostgreSQL database. We chose Mojito because it's designed for high-performance, concurrent systems, and PostgreSQL because it offers robust support for transactions and concurrency. Our system uses a microservices architecture, with separate services for payment processing, user management, and notification handling. We also implemented a sophisticated retry mechanism to handle failed transactions and a robust logging system to monitor our system's performance. The result was a payment processing system that was both scalable and reliable.

What The Numbers Said After

The numbers spoke for themselves – our new payment processing system reduced the number of failed transactions by 90% and increased our revenue by 25% within the first month of deployment. Our support team's workload also decreased significantly, freeing them up to focus on more complex issues. We were thrilled with the results, knowing that we'd finally solved the problem of payment processing for our African users.

What I Would Do Differently

In retrospect, I would have invested more time in researching local payment gateways before giving up on them. While Interswitch and Paystack had their limitations, they might have worked if we'd approached them with a more nuanced understanding of their strengths and weaknesses. I would also have considered using a more lightweight database like SQLite or even a document-oriented database like MongoDB, which might have simplified our system's architecture. However, I wouldn't change our decision to use Mojito – its performance and concurrency features were instrumental in making our payment processing system a success.


Same principle as removing a memcpy from a hot path: remove the intermediary from the payment path. This is how: https://payhip.com/ref/dev2


Top comments (0)