Payments

Stripe Checkout for a Digital Product

Sell a PDF, template, or course with one-time Stripe payment and automatic delivery.

What You’ll Get

A complete payment flow for selling a digital product (PDF, template, course — whatever you want). A customer clicks "Buy," Stripe handles the payment securely, and when it goes through, they automatically get an email with a secure, time-limited download link. No subscription management, no complex billing — just a clean one-time purchase.

Tech Stack Explained

Every tool in this recipe, explained in plain English.

Stripe — The payment processor. It handles credit cards, Apple Pay, and Google Pay so you never touch sensitive payment data. Sign up →
Resend — Sends the delivery email with the download link after payment succeeds. Sign up →
Cloudflare R2 — Object storage where your digital product file lives. Like a hard drive in the cloud, but fast and cheap. Sign up →
HMAC tokens — A cryptographic technique that creates secure, one-time download links. The link expires after 48 hours and can only be used once.

The QRALPH Prompt

Copy this prompt and paste it into Claude Code. This is exactly what you’d say to QRALPH to build this project.

/qralph:qralph Build me a Stripe checkout flow for selling a digital product. I need a buy button that redirects to Stripe Checkout for a one-time payment. After payment succeeds, a Stripe webhook triggers a signed download URL (HMAC, 48h TTL, single-use) and sends a delivery email via Resend with the download link. Store the product file in Cloudflare R2. Deploy to Cloudflare Workers. Include a success page after purchase.

What Happens Next

QRALPH sets up the Stripe integration with proper webhook verification, generates the HMAC signing logic for secure downloads, and wires up the email delivery. It creates tests for every payment scenario — successful purchase, expired links, duplicate downloads — so you know it works before you go live.

← Back to All Recipes