Hello,
I am setting up recurring payments on Stripe and am at the stage where I want to test the webhooks. The user is currently able to subscribe to the recurring plan (tested on demo) but I am getting an error when user tries to update a plan.
When I create an end point in Stripe, the next page never updates to show my endpoints (it’s stuck on ‘waiting’?)
Stripe support said that this is as a result of one of the mandatory parameters (return_url) being empty but none of their documentation relates to Bubble’s no code, it refers to languages I don’t understand. Has anyone had experience with Stripe set up who understand where and how to add (return_url)?
I’m assuming you’re talking about the Stripe customer portal return url…
In which case, unless you’re overriding the default settings in your API call, you can set the return URL in your Stripe Dashboard, under Billing>Customer Portal
Thanks Adam, I went to Stripe’s Billing > Customer Portal and added all the info required there.
Still, the issue remains that I cannot set up new webhooks, here are the steps I take;
- Create API workflow in Bubble’s backend
- Click ‘Detect data’ on the API workflow
- Go to Stripe and ‘Add endpoint’
- Endpoint page gets stuck ‘Waiting for events…’ and Bubble doesn’t recieve any webhook data
The odd thing is that I did create a webhook several months ago which still works. If I click ‘Detect data’ on the API workflow and resend the data from
Stripe it works fine. For some reason, new webhooks are not working.
Bubble threw up this issue which may be related?
How are you triggering the event?..
Stripe recently removed the ability to send test events from the Dashboard, so to initialize the call you’ll need to actually trigger the event somehow from your app…
Alternatively, you can use the Stripe CLI to send a test event.
I haven’t personally used it (as most of my Stripe webhooks were set up before they took away the ‘send test event’ function, and for more recent ones I just send an actual event from my app), so can’t say too much about it, but having had a quick look at the docs it seems straight forward enough to use…
Test a webhooks integration with the Stripe CLI | Stripe Documentation
How are you triggering the event?..
When you create a new webhook in Stipe, the final save button ‘Add endpoint’ automatically directs to a new page which (used to) automatically send data to the Endpoint URL address specified during the webhook creation.
having had a quick look at the docs it seems straight forward enough
I wish I had your skills, it looks daunting to me!
Stripe recently removed the ability to send test events from the Dashboard
This would explain why my older webhooks work, shame Stripe’s support failed to mention that! Regards to the link you kindly recommended, the first step to Install the Stripe CLI (on Windows) is to download stripe-cli from github, but githib pages don’t provide a download button!?
to initialize the call you’ll need to actually trigger the event somehow from your app
Actually, maybe I should just assume the webhooks work and then just pretend to be a customer of my app and test payments, cancellation, card expired etc to see if Bubble get’s the data sent from Stripe, this may be easier than learning Stripe CLI.
No it doesn’t (I’m not sure where you’ve got that idea from?..)
Once you add an endpoint in your Stripe dashboard it just says ‘Waiting For Events’ (as you’ve already shown in your screenshot) until the first event is triggered.
You need to trigger it somehow (or use the CLI - but the easiest way it just to trigger it yourself)
Oh, in that case I can’t actually remember how I triggered the webhook before.
UPDATE: This post is redundant as I have fixed the issue but will leave for others to view.
I had a really nice reply from Stripe today which said the error I get when accessing the customer portal ‘the parameter return_url is empty and is mandatory’ isn’t a Stripe specific error, so at least I know I need to add the return_url
in Bubble somewhere.
I found a tutorial How to add the Stripe customer portal to Bubble.io and they show this return URL parameter in the workflow:
The problem is, in their example they ‘Create a portal session’ whereas I do not have that option in my Bubble?
I have the one below - I have set (what I think is a return url) to www.google.com as a test;
Still, when I try and access my Stripe customer portal I get the same error; “Self Service Portal error: the parameter return_url is empty and is mandatory”.
I do have a ‘Self Service Portal - Stripe Portal w/ dynamic return url’ as shown below but that didn’t fix the issue.
With regards to the Stripe ‘default redirect link’ found here Stripe Login | Sign in to the Stripe Dashboard I have set this up so that shouldn’t be causing the issue.
Oh, I have got it … I needed to remove step 2 in the workflow below! I will leave these comment for others who may have same issue … but the answer is to use Self Service Portal w/dynamic return URL
Note: You do not put the return URL in the Stripe Portal Plugin: