Classes 10–12 (H): Deploy the Edge Functions and the Stripe webhook
Part of the task-app setup for Classes 10–12. Work through the parts in order, doing every step yourself; Start here has the worksheet, the screenshot log, how to ask Claude when you’re stuck, and the list of all parts.
Time: about 10–15 minutes.
As of Oct 22, 2026 · Official docs: Supabase Edge Functions · Supabase: Edge Function secrets · Stripe webhooks
Deploy the three functions. In VS Code’s terminal, first go into the app’s folder (harmless if you’re already there; this just makes sure):
cd ~/projects/full-stack-demo-app/task-appThen type these three commands, one at a time (they’re also on the worksheet’s Commands sheet). The folder names use hyphens (the older chapter, Step 11, gets them wrong):
npx supabase functions deploy create-task-with-ainpx supabase functions deploy create-stripe-sessionnpx supabase functions deploy stripe-webhook --no-verify-jwtIn each command,
functions deployuploads one Edge Function, named by the argument after it (the name of its folder insupabase/functions), to Supabase’s servers, where it runs. The option--no-verify-jwton the last one lets Stripe call the webhook function without a Supabase login. (The function checks Stripe’s signature instead.) In the dashboard, this is the switch Verify JWT with legacy secret under Edge Functions > stripe-webhook > Details; it should be off.Create the webhook in Stripe. A webhook is a web address that Stripe calls to tell your app that something happened, such as “this customer paid”. Open dashboard.stripe.com/webhooks and click Create an event destination:
- Events from: Your account.
- Payload style: Snapshot. Stripe suggests “Thin”, but this app’s code only understands Snapshot events.
- Events:
checkout.session.completedandcustomer.subscription.deleted(the two the code handles; the README also listscustomer.subscription.updated, which does no harm). - Destination type: Webhook endpoint.
- Endpoint URL: your Stripe webhook URL from the worksheet (
https://YOUR-PROJECT-REF.supabase.co/functions/v1/stripe-webhook).
On the destination’s page, click Reveal next to the signing secret (
whsec_...) and copy it into the worksheet. Then copy the worksheet’sSTRIPE_WEBHOOK_SECRETline. In VS Code’s terminal, first go into the app’s folder (harmless if you’re already there; this just makes sure):cd ~/projects/full-stack-demo-app/task-appThen paste the line into the terminal and press
Enter.
Stripe may show an event as delivered even when the app rejected it (the function always answers “OK”). If an upgrade doesn’t show up in the app, look at the stripe-webhook logs in the Supabase dashboard under Edge Functions.