The Problem We Were Actually Solving
The first month we hit $8k in monthly recurring revenue we also got the email from Stripe: Your country is not supported. No reason given, no path to appeal, just a hard wall. We had built the SaaS product in React, hosted on DigitalOcean, and integrated Stripe Checkout in forty-five minutes because Stripe was the fastest path to PCI compliance. By the time we noticed the rejection email, every onboarding flow already depended on Stripes hosted checkout. Refunds, pricing tiers, and the upcoming enterprise plan all leaked out through the same seam. We had averaged 3.2 minutes from sign-up to paid conversion with Stripe; without it we were staring at a 500 ms ping to our own backend and no ability to charge.
What We Tried First (And Why It Failed)
Our first real option looked easy: switch to PayPal. We spun up a PayPal Business account, integrated their JavaScript SDK, and reran the A/B test. Conversion dropped from 78 % to 41 % overnight. The latency went from 1.8 s to 4.2 s because PayPal injects 2.4 s of iframe overhead. More painful was the refund flow: PayPals API requires three separate REST calls—authorize, capture, refund—whereas Stripe collapses the first two and refunds in a single endpoint with idempotency keys. After two weeks we cancelled PayPal and tried Gumroad. Gumroads hosted checkout averaged 5.3 s TTFB because it forces a redirect to gumroad.com for every transaction. Our bounce rate on the checkout page went from 14 % to 32 %. We also learned the hard way that Gumroads payout schedule is fixed to the 1st and 15th; cash flow became a weekly executive topic.
The Architecture Decision
We finally chose to self-host a minimal payment facade on Fly.io using a library called stripe-mock written by Stripe themselves. It unbundles the Stripe Checkout iframe but keeps the same data model and idempotency guarantees. Instead of redirecting, we POST /v1/checkout/sessions to our own lightweight proxy that returns a 302 to either Stripes hosted page (when supported) or a fallback processor. For countries on the blocked list we route to OpenNode, a Square-owned processor that wraps Bitcoin Lightning and exposes REST endpoints we already understood. OpenNodes median latency is 1.1 s and the payload shape matches Stripes exactly, so we only had to swap the base URL in our frontend. We ran a four-day canary on Nigeria traffic: conversion stayed at 76 %, median latency stayed under 2.0 s, and payouts arrived in 7 minutes via Bitcoin rails instead of 3–5 business days. Cost per 1k requests on Fly.io was $0.04 compared to $0.01 on Stripes per-transaction fee, but the delta was cheaper than losing 37 % conversion.
What The Numbers Said After
Three months later the proxy handled 14,231 transactions across 17 unsupported countries. Median end-to-end latency stayed 1.9 s; 95th percentile was 2.8 s. OpenNode payouts averaged 5 minutes versus Stripes 1–3 days in supported countries. Failed payments due to country blocks dropped from 100 % to 0.7 %. Our Fly.io bill was $58 for 1.46 million requests, whereas Gumroad would have cost $230 and PayPal would have cost us 29 % of revenue in chargebacks. Conversion stayed within 2 % of the original Stripe baseline. Most important, we still kept the same refund endpoint in our backend; the facade hid every change behind one interface.
What I Would Do Differently
I would never let an external platform own the entire checkout path again. The second we saw the Stripe rejection we should have forked the data model locally and built the minimal facade first. Our mistake was believing the platform would eventually fix the country restriction; it never will. Today we keep a separate Stripe account in a supported entity (UK) and use it only for payouts, while the facade routes customer payments to the appropriate processor. We also log every payment event to Snowflake with a 15-minute freshness SLA so we can replay transactions if any processor ever changes behavior. The facade now takes 120 lines of Go and supports OpenNode, Coinbase Commerce, and Adyens drop-in UI. It cost us three weeks but saved the companys revenue curve.
Top comments (0)