I’ve used Stripe successfully on a few projects in the past along with their webhooks.
Recently however Stripe has taken away the ability to Initialize a webhook. I’m working on a project that will require a Stripe webhook to let the app know when a new subscriber has successfully joined.
Does anyone have any insight or experience setting things up for a Stripe webhook in Bubble now that we can’t initialize the call from Stripe?
The way to initialize a Stripe webhook is to trigger the event.
When you are about to set up a Stripe webhook … be ready to trigger an event. Perhaps open other browser tab/tabs to be ready to this when you are setting up the webhook.
Thanks for the feedback. Can I get a little more clarification about what you mean.
The process I am used to, is to set up the webhook in Bubble and then it gives me a URL ending in ‘/initialize’. I then take that URL and go to the Stripe dashboard under webhooks and create a new webhook and populate it with that ‘initialize’ URL.
Back in Bubble, Bubble is just waiting on this screen to get a ping by Stripe which used to be accomplished by using the “Send Test Webhook” button in Stripe, which is now gone.
Can you explain a little more by what you mean by simply triggering an event?
It originates in Stripe when a user is successfully charged as a new subscriber. I’m using the Stripe.js plug in, so the user puts in their CC info and sends it to Stripe for processing. If successful Stripe sends a webhook back, if unsuccessful Stripe sends a webhook back as well.
Hi underhill.dan,
Unfortunately, as you noticed “Send Test Webhook” is gone. I think it is easiest to use manual initialization in Bubble and copy e.g. the example session object or whichever you need from Stripe API reference – The Session object – curl
If you really want to use the automatic method:
You can now either use CLI to do it (Test a webhooks integration with the Stripe CLI | Stripe Documentation) or if you’re not into using terminal:
Set the webhook to point to initialize URL you are given by bubble.
Then trigger the event you are listening for by using your app or stripe dashboard. e.g subscribe a new user.
Then remove /initialize from the webhook URL in the Stripe dashboard
I encountered this issue a while back @underhill.dan. Stripe seemed to have changed their UI for some reason and it’s a bit of a pain.
However there is a (slightly hacky) workaround that allows you to still initialise the call from Stripe.
The key is to actually do the action you’re trying to intialize the webhook for, before you have the webhook setup.
EG if you’re trying to create a webhook that lets bubble know when a user cancels their subscription you, have to create the relevant endpoint in Stripe and then manually cancel the subscription in the Stripe dashboard.
The webhook you have set up will fail, but if you go into “Events” and find the relevant attempt, there will be a “resend” button. If you click this button its basically the same thing as clicking the “initialize webhook” button in the previous UI.
Hey thanks for the video. I was already able to activate the Webhooks and everything is working fine on stripes end, just kind of confused as to how the “request data” function works, because am trying to retrieve the customer ID or subscription ID. Does it have to be done manually with a button or can it be done when the page is loaded automatically?