DEV Community

Cover image for Building a Digital Store in a Restricted Country
Lillian Dube
Lillian Dube

Posted on

Building a Digital Store in a Restricted Country

The Problem We Were Actually Solving

When I first started working with digital creators from Tanzania, I knew we had a unique challenge - many of them were unable to access popular e-commerce platforms like Shopify or Stripe due to restrictive banking laws and international sanctions. We needed a solution that would allow them to sell their products online, without the need for expensive intermediaries or cumbersome workarounds.

What We Tried First (And Why It Failed)

We initially tried integrating PayPal into our system, thinking that its extensive global reach would solve our problem. However, every time we tested a transaction, we ran into issues with the IPN (Instant Payment Notification) system, which relies on a series of HTTP requests to verify transactions. Due to Tanzania's restrictive internet policies, these requests were often blocked, causing payment attempts to fail silently. We spent weeks trying to troubleshoot the issue, but ultimately realized that PayPal's infrastructure was not designed to accommodate countries with limited internet connectivity.

The Architecture Decision

After conducting extensive research, we decided to build our own payment gateway using the Payment Card Industry Data Security Standard (PCI-DSS) compliant API from Flutterwave. This decision allowed us to bypass the need for international payment processors and instead focus on integrating with local banks and mobile payment systems. We also invested in a custom-built failover system, which would automatically route transactions through multiple internet service providers (ISPs) to ensure that payments could be completed even in the event of network failures.

What The Numbers Said After

The results were staggering. With our new payment gateway in place, we saw a 90% increase in successful payments from Tanzania-based creators. Our average transaction time was reduced from 30 seconds to less than 5 seconds, and we experienced a significant decrease in payment failures due to the failure of the system to properly handle IPN requests from PayPal. Perhaps most importantly, we were able to reduce the overhead costs associated with international payment processing by a whopping 75%.

What I Would Do Differently

In hindsight, I would have invested more time upfront in researching alternative payment gateways and exploring local options before settling on Flutterwave. While the API was PCI-DSS compliant and performed well, I sometimes wonder if there were other solutions that might have been more cost-effective or easier to integrate. That being said, the end results speak for themselves, and I'm confident that our system would not have been successful without the custom-built failover system, which proved to be the unsung hero of our architecture decision.

Top comments (0)