Making Stripe 200x faster
Since you already have to sync your data, why not speed up reads?
No AI has been used to assist with the writing of this post
Background
I used to work at Stripe as an Integration Engineer. One of the most common requests was "why can't I use stripe.customers.retrieve in production?". The answer is: because they don't guarantee high enough rate limits in production for reads (for processing payments you are good). And the solution: sync the data you need into your db using webhooks.
This was pretty annoying since the Stripe UX forces you to hand select which webhook events to listen to. And most of the new users did not know what they would need in the future. That is how projects like Supabase Stripe Sync were born (which was eventually transfered to Stripe Engineers: https://github.com/stripe/sync-engine).
Building a faster Stripe SDK
Since we now have an easy way to sync ALL our Stripe data to our Postgres (via the open source library or with the new beta released in Sessions 2026) we could write a stripe-proxy that calls real Stripe for write operations but queries from db for read operations.
I published the proxy as part of https://github.com/pretzelai/stripe-no-webhooks, an open source utility library we made to handle db sync and other billing boilerplate (we talked about it on Hackernews).
import { StripeProxy as Stripe } from "stripe-no-webhooks";
const stripe = new Stripe(process.env.STRIPE_SECRET_KEY);
// DATABASE_URL taken from env file
const customer = await stripe.customers.retrieve("cus_123"); // served from DB
Benchmark
On average, Stripe reads are 200x faster than calling the Stripe API. Some calls can randomly take entire seconds to complete (very common with charges endpoint for example) making it 1000x faster.
Note: this benchmark assumes postgres located in the same network, if your db is a third party service it will be slower.
You can run the benchmark from the project's github: https://github.com/pretzelai/stripe-no-webhooks/blob/main/benchmark-stripe-proxy/README.md