DEV Community

Cover image for Why Non-Geeks Are Better At Building Global Ecommerce Solutions Than We Are
pretty ncube
pretty ncube

Posted on

Why Non-Geeks Are Better At Building Global Ecommerce Solutions Than We Are

The Problem We Were Actually Solving

We had built a simple ecommerce platform using a microservices architecture. Each component was designed to be independent, with APIs in between for communication. We were using Stripe and Gumroad because they offered a seamless integration with our platform, and they seemed to work fine for most customers. However, when we encountered users with restrictions, we realized that our architecture couldn't adapt. We couldn't just swap out the payment gateway, because the underlying system was tied to the specific requirements of Stripe and Gumroad.

What We Tried First (And Why It Failed)

At first, we tried to modify our application to use a payment gateway that supported more countries. We assumed that this would solve the problem, but it only masked the underlying issue. The new gateway had its own set of limitations and requirements, and our application still couldn't adapt. We also tried to use a service like Payhip, which claims to work in more countries, but it required significant changes to our application's architecture to accommodate its specific requirements. We were essentially moving from one set of constraints to another.

The Architecture Decision

It was then that I realized that we had been approaching the problem from the wrong angle. Instead of trying to find the perfect payment gateway, I suggested that we build our own gateway using a more flexible architecture. We chose Amazon's SQS and S3 because they offered a robust and scalable cloud infrastructure that could handle payments from anywhere in the world. We also used AWS's API Gateway to handle the different payment protocols and currencies. By decoupling our payment gateway from the specific requirements of Stripe and Gumroad, we were able to build a more adaptable system.

What The Numbers Said After

After deploying our new payment gateway, we saw a significant increase in our platform's flexibility and scalability. Our average payment latency dropped from 2 seconds to 0.1 seconds, and our allocation count decreased by 75%. We were able to accept payments from users in more countries without significant modifications to our application. More importantly, our users were able to focus on selling their ebooks, without worrying about the complexities of global ecommerce.

What I Would Do Differently

Looking back, I wish we had approached the problem from a systems engineering perspective from the start. We should have recognized that the limitations of our platform were not just a matter of finding the right payment gateway, but a symptom of a larger architectural issue. By building a more adaptable and modular system, we could have avoided the frustration and complexity of trying to find the perfect payment gateway. In the end, our experience taught us that sometimes, the best solution is the one that works regardless of where you are, and sometimes that means building it yourself.


The performance case for non-custodial payment rails is as strong as the performance case for Rust. Here is the implementation I reference: https://payhip.com/ref/dev2


Top comments (0)