Edge Subscription & Checkout Engine
The billing and checkout system behind sazm.in: two payment gateways, country-based pricing and subscription webhooks, running on Cloudflare's edge. You can inspect it live on this site.
Visitors pay in their own currency through the payment gateway for their region. Each visitor must see only their own prices and checkout, with nothing from the other region leaking into the page.
A Cloudflare Worker reads the visitor's country at the edge and rewrites the page to the matching currency and gateway. Webhooks are verified (each gateway's own signature check) and processed idempotently into a D1 SQLite database.