From a design that never stores card data yourself, through Customer, Price, and Checkout, Webhook signature verification and idempotency, failed payments and cancellations, all the way to switching to live mode and reconciling revenue. Across 30 lessons you'll get to the point where you never trust the page you're redirected back to and keep billing state correct through Webhooks alone. All code and test results were run for real against Django 6.1.1, stripe 15.6.1, and Stripe's own stripe-mock — no real keys or billing account required.
The 30 lessons are split into 6 chapters. We recommend working through them in order starting from Chapter 1, but feel free to skim just the parts you're curious about. * Django and stripe-python can't run in the browser, so try them in your local virtual environment with stripe-mock. Parts that only need the standard library, like computing a signature or checking a key, can run right there in the browser.
Start by committing to a design that never stores card data yourself, then learn the difference between test and live mode and the four core objects: Customer, Product, Price, and Subscription. We finish by building a lookup that maps a subscription's price back to a plan on your own site.
Define your own plans along two axes, rank and video, link your users to Stripe customers by ID, and send them to the payment screen through a Checkout Session. We finish by nailing down exactly who paid using client_reference_id.
Start with why you should never trust the page redirect and instead rely on Webhooks alone, then nail down signature verification, rejecting tampering and replays, idempotency, and handling retries one by one. We finish by using stripe listen to receive notifications locally before going live.
Reflect every stage of a subscription — starting, upgrading, scheduling a cancellation, a failed payment going past_due, and reverting to free on cancellation — as each Webhook arrives. We finish by opening up the customer portal so users can handle cancellations and changes themselves.
Cover the practical work that always surrounds billing: coupons and discounts, reading the end of the current period from an invoice, a separate track for business customers, and the disclosures required under Japan's Specified Commercial Transactions Act. We finish by building a mechanical check that catches any missing required disclosure.
Mechanically check your switch from test to live mode, and settle on key management and what to do if a key leaks. We close out the course by treating Stripe as the source of truth and catching drift against your own site's plans through revenue reconciliation.
Once you finish all 30 lessons, move on to Shipping and Running a Service, where you'll take your now-billable service live and keep it running. All courses unlock with a membership.