Handling signed Stripe Webhooks with Edge Functions

preview_player
Показать описание
Handling payments is a central part of building an online business. And when you're processing payments, for example with Stripe[0], you will need to create a webhook handler[1]. In this episode we'll look at handling signed Stripe Webhook events in Deno Edge Functions[2].

## Chapters

00:00 Intro
00:27 Project Setup
02:36 Stripe Webhooks Intro
03:28 Testing Stripe Webhooks locally with the Stripe CLI
04:15 Create new Webhook Handler Edge Function
04:38 Using stripe-node with Deno
06:08 Setting up the .env File
07:44 Verifying Stripe Webhook Signature in Deno
11:55 Serve Edge Function locally
13:30 Forward Stripe Webhooks to localhost
14:50 Deploy Edge Function Webhook Handler
15:11 Set Edge Function as Stripe Webhook

## About Edgy Edge Functions

Edgy Edge Functions is a video series where we explore Supabase Edge Functions[2] and Deno[3] functionality and features.

If there's something you'd like to learn about, please open an issue[4] and let me know on this Tweet thread[5].

Thanks for stopping by! Denosaur and I will see you soon \o/

Рекомендации по теме
Комментарии
Автор

Again thanks for this Thor. One day i'll make again all of these steps you described to setup Stripe with Supabase because it is really useful!

codewithguillaume
Автор

This is the first time I try to do something like this. Thank you. I hate my life.

estebansierra
Автор

Thank you so much for this. It helps me a lot and save my time. Thank you again.

KartickSadhu
Автор

This is incredible work and it actually really helped me implement what I wanted but why does Thor keep smacking his mouth every few mins 🤣

CSkyGameGen
Автор

I’m a bit confused cuz the webhook edge function gets all that info, but how do I set that info in my db? For example, I my function successfully triggers on a payment complete. I get that logged out fine, but now I want to put it in my db

thechronicgrump
Автор

Thanks for this video! What I don't understand here is the apikey – Supabase always requires the apikey header to be present (as far as I know), but presumably Stripe doesn't sent it when calling your endpoint. So how do you work around that?

LaViam
Автор

I got this message " Please note: this key will expire after 90 days, at which point you'll need to re-authenticate. " What should I do and how should i do it after 90 days ?

AbdelmadjidLablack
Автор

I followed all the steps, but after triggering the Stripe event locally I get a 404 response from supabase.

Nemesisthetrickster
visit shbcf.ru