DEV Community

Cover image for Selling Digital Products Across Borders: Where PayPal and Stripe Fail, a Serverless Solution Succeeds
Faith Sithole
Faith Sithole

Posted on

Selling Digital Products Across Borders: Where PayPal and Stripe Fail, a Serverless Solution Succeeds

The Problem We Were Actually Solving

What we soon discovered was that neither PayPal nor Stripe were an option for our users in countries like Cuba, Iran, or North Korea. These countries are either blocked by the payment gateways due to US sanctions or have local payment systems that aren't supported by these gateways. Moreover, even for users in countries with a strong online presence, there's a common problem where PayPal or Stripe declines transactions due to "country restrictions." This essentially puts a lot of countries at risk of not being able to buy products from our platform.

What We Tried First (And Why It Failed)

We initially thought the problem was with our serverless architecture, using AWS Lambda and API Gateway. We believed that if we could just add more payment gateways, we could solve the problem. So, we integrated Payhip and Gumroad into our system. However, there was a catch: many of our users didn't actually have an active Payhip or Gumroad account, which significantly reduced the chance of successful transactions. This got us thinking that even if we had a solution, it wasn't going to work for our users in countries where these services were restricted.

The Architecture Decision

Our breakthrough came when we decided to use a custom-built checkout system on our own servers, along with the Stripe and PayPal integration. However, the key differentiator was that our checkout system allowed users to make payments directly to our platform's bank account, bypassing the need for these payment gateways altogether. This gave us much more control over the checkout process, allowing us to handle edge cases that our users had previously encountered. We used Stripe Connect to accept international transactions directly, which solved the problem of restricted countries, and we even got paid on time.

What The Numbers Said After

After implementing the new checkout system, we saw a significant increase in successful transactions: from around 30% to 70%. More importantly, this system allowed us to keep 100% of the revenue for a longer period of time, as we didn't have to rely on third-party payment gateways that would take up to a few days to transfer funds.

What I Would Do Differently

Today, I would recommend building the checkout system at the start of the project, rather than trying to bolt it on later. We had to go through a few iterations before we realized that the payment gateway problem was a platform problem, not a technical one. Secondly, I would focus on using supply chain risk management tools to identify the potential risks and blockages with payment providers before they become a major issue.

Top comments (0)