Stripe (Send Test Webhook Question)

Hi all,

I’m so close to getting the Stripe integration working for my Bubble app, but one thing I need to do is listen for when a users Stripe card fails or is cancelled to then change their role in Bubble.

I’ve followed this great tutorial but at the step where you need a send a test webhook from Stripe, the UI in Stripe is now changed and I don’t see any option to send this test webhook to then be able to retrieve the Stripe data for the workflow.

Anybody else able to achieve this to make sure subscription cancelled can be listened to in Bubble? Thanks!!!

I believe Stripe has a command line tool that can be used to trigger webhooks (just Google “test stripe webhook”).

I make use of Stripe metadata, so I typically just set the Bubble endpoint to Detect data and run through actual test transactions (in test mode). That way, I have real data that’s relevant to my app. Stripe has a list of card numbers that generate various payment statuses.

Thank you, how would you go about testing a failed credit card or lapsed payment?

Just click the link I provided and scroll down. There are test CC numbers for lots of scenarios.

1 Like

Perhaps there’s a simple solution to achieve what I need but I’m not sure how to set this up. I have the Stripe Customer Portal working correctly so a user can subscribe to my 1 plan and then can edit their CC or cancel the plan all on Stripe’s end.

Here you can see a clicked cancel plan for this test user, but I don’t understand how to make it so Bubble knows if a user is “cancelled” subscription status

I’m looking for this too.

Test a webhook endpoint | Stripe Docs

Only by webhooks Bubble would know that it’s cancelled. This is the most secure way. Imagine everyday logging into your Stripe account to verify manually who cancelled the payment to change it in your app later…

Start Using Stripe CLI | Stripe Docs

Yes, as @Landowski says, you’ll need to set up a webhook to listen for the “subscription canceled” (or whatever it’s called) event. Stripe has pretty good documentation.

Webhooks are just automated http requests sent from one server to another (from Stripe to your Bubble app in this case) which are triggered when certain events occur; so your Bubble API endpoint functions as a “listener” for Stripe’s webhook events.

One way to initialize your endpoint is to click the “Detect data” button and then temporarily change the Stripe webhook to include the “initialize” path parameter in its request URL (done via the Strip dashboard), and then cancel a subscription in your app to actually trigger the event so that your endpoint can capture the webhook data (which will have information about the customer and subscription status). And don’t forget to remove the “initialize” portion of the webhook URL once initialized.

Anyway, that’s the gist of it.

Yep. You will see the triggered event on Stripe webhook’s logs (if on the free plan, you will see the message to upgrade your Bubble plan).

This topic was automatically closed after 70 days. New replies are no longer allowed.