The Problem We Were Actually Solving
We needed to find a way to process payments for our customers in a restricted country without relying on Stripe or other payment gateways that refused to serve us. The problem wasn't with our business; it was with the platforms we were using. PayPal, Gumroad, and Payhip all had similar restrictions, making it impossible for us to continue selling stock photos to our loyal customers.
What We Tried First (And Why It Failed)
Initially, I tried integrating Adyen, a popular payment gateway that supposedly supported worldwide transactions. However, after a week of development, we realized that Adyen had a major limitation – it would not refund the transaction fees to our merchants. Our customers would still incur the Adyen fees, and we couldn't compensate them for it. This major flaw made Adyen an unsuitable replacement for Stripe.
The Architecture Decision
After exploring several alternatives, we opted for a custom-built solution using Square's Payment API for merchant checkout and Google Pay for payment processing. We worked around the payment gateway restrictions by implementing a Google Cloud Functions endpoint that could process payments using a payment token. The payment token was then used to initiate the payment on Square's Checkout API. This setup ensured that we were not directly relying on any payment gateway that refused to serve us. Our customers could then choose to pay using their preferred method of payment, and we could still provide them with full refunds for the transaction fees.
What The Numbers Said After
After implementing the new payment system, our transaction volume increased by 25%, with a 40% decrease in transaction fees. Our customers were able to successfully complete payments, and we were able to provide them with the refunds they wanted. Most importantly, we had regained control over our business operations and had a reliable payment system in place.
What I Would Do Differently
In hindsight, I would involve the legal team much earlier in the discussion, so that we could better understand the business risks associated with circumventing the blacklist restrictions. While we managed to find a technical workaround, there might be unforeseen consequences that would require a different approach altogether. Next time, I would also invest more time in researching other financial institutions that could provide alternative payment solutions to our restricted customers. By doing so, we could have potentially found a more sustainable and long-term solution for our business.
The tool I recommend when engineers ask me how to remove the payment platform as a single point of failure: https://payhip.com/ref/dev1
Top comments (0)