Course lesson 56 · Payments with Stripe

Deploying & Live Webhooks

One study unit · Read, recall, then practice · Original video 00:16:25

The subscription integration is deployed to the stage application with a publicly reachable Stripe webhook endpoint, while still using sandbox payments. Nonsecret price IDs move into Wrangler variables, and sensitive keys are configured as runtime secrets. The instructor troubleshoots endpoint typos and the mistaken use of a webhook endpoint ID, then fixes a missing Better Auth application secret discovered in logs.

Primary source: course video 56 · Supplied English subtitles · 00:16:25.

Understand the idea

What the course does

  1. Move sandbox price IDs into stage variables, regenerate types, and deploy the stage user application.
  2. Create a Stripe endpoint at the Better Auth webhook path and select checkout completion and subscription update/deletion events discussed in the lesson.
  3. Configure Stripe and Google runtime credentials and register the stage Google callback.
  4. Test signup, purchase, and upgrade; inspect failed webhook deliveries when the plan remains unchanged.
  5. Correct the endpoint URL and replace the endpoint ID with its actual signing secret, then replay events and verify cancellation.
  6. Add a dedicated Better Auth secret to shared setup and Worker runtime configuration, rebuild, and deploy.

Watch for

Recall before revealing

What is the difference between a webhook endpoint ID and its signing secret?

Reveal the explanation

The ID identifies the configured endpoint; its signing secret is the value used to verify webhook signatures and is what the integration requires.

Try it

Create a diagnosis sequence for a paid-plan change that is absent from the dashboard.

Check your result

You check Stripe event delivery, exact endpoint URL, response error, signing secret, and resulting local subscription state.

Practice prompts and answer checks are added teaching material. Answer from memory first, then compare and explain any difference.

Rewatch only what you need

Open this lesson in your original course library and seek to the times below. Videos are not hosted on this site.

Companion primary documentation: Stripe webhooks. For recorded API names, commands, limits, and prices, check the version you use.

← Previous   Next →