The Problem We Were Actually Solving
My goal was to build a seamless ebook purchase experience for users in various regions, where PayPal, Stripe, Gumroad, and Payhip were either blocked or highly restricted. I knew that our app's unique value proposition - providing data-driven insights to its users - could be compromised if I had to resort to traditional (and inflexible) payment gateways. The problem, however, was that our existing infrastructure was tied to these platforms, making it a high-risk, high-reward move to explore alternatives.
What We Tried First (And Why It Failed)
Initially, I attempted to use a third-party ebook sales platform like E-junkie, which promised to integrate seamlessly with popular ecommerce solutions. Unfortunately, their API offered limited control over the checkout process, and I couldn't quite get the customizations we needed without extensive custom development. We also experimented with a headless ecommerce solution like Shopify Plus, but their APIs and payment gateways still required us to expose sensitive financial data to the web, which went against our security best practices.
The Architecture Decision












