Back to articles
How I Set Up Stripe Checkout in 2 Hours Without a Backend

How I Set Up Stripe Checkout in 2 Hours Without a Backend

via Dev.toDasha Dagayeva

I needed to sell 9 digital products on a static site. No Next.js. No Express. No backend framework at all. Just HTML pages on Vercel and Stripe Checkout handling the payment UI. Here's the entire architecture: 3 serverless functions. That's it. The Problem I had 9 developer kits ($14–$59) ready to sell. I needed: A checkout flow that creates Stripe sessions Sale notifications via email A success page that shows the right download links I didn't want to spin up a backend framework for what's essentially 3 API endpoints. The Architecture Browser → POST /api/checkout → Stripe Checkout Session → Stripe hosted page ↓ Customer pays ↓ Stripe webhook → POST /api/webhook → Verify signature → Send email via Resend ↓ Success page → GET /api/session → Fetch session → Show download links Three files. No framework. No database for orders (Stripe is the database). File 1: api/checkout.js Creates a Stripe Checkout Session. The product slug comes from the button click, gets mapped to a Stripe Price ID.

Continue reading on Dev.to

Opens in a new tab

Read Full Article
2 views

Related Articles