Here’s the background for what I’ve done in my app, and what I think I know to be true:
Within my app, the subscribing a user to a plan works.
There is some form of built in webhook from Stripe to Bubble such that I am able to easily obtain the Stripe Customer Subscription Status value.
Now I want to simulate subscription charge failures, so I can take appropriate actions to them within my app.
And I’m not figuring out how to do this.
I know that:
Within my Stripe dashboard I can switch to test data, and look at subscriptions.
Within my Stripe dashboard I can define endpoints, in which I provide a URL of the webhook, which per Stripe I have to do in order to send fake/test signals back to the webhook
But Bubble has a good integration with Stripe already and to get the Subscription Status I need only grab the value of Current User Stripe Customer Subscription Status
So, considering all of the above, how do I send fake/test Stripe Subscription Status codes from Stripe to Bubble so that in Bubble I can implement workflows to take the appropriate actions for the various returned Subscription Status codes?
I’m tagging you guys as you were very helpful in a prior thread on a different Bubble/Stripe issue and I’m hoping you have some insight here. In fact you guys helped me understand the very concept of being able to just “grab” the value of Stripe Customer Subscription Status, which last week I didn’t even know was a thing.
Good question, I have to say I’ve never tested such use case yet. I think it could be possible to simulate a failed subscription payment by using one of the “test” card number provided by Stripe for testing purpose. The 4242 4242 4242 4242 card always works, but there are others for testing failing scénario
I’ve used the test card numbers extensively in setting up the initial Subscript user to a plan. However, once the user is subscribed to a plan, how do I test that their initial subscription was valid, but on their next payment date the monthly subscription charge fails?
It’s the subsequent charge failing I want to test now.
I’ve been to that Stripe document already. It helped drop me into my current rabbit hole. Per that document, I use use the Bubble webhook endpoint I’ve created then defined in Stripe to send fake/test signals back.
The problem here is I didn’t create a Bubble webhook for Stripe. It’s somehow built into Bubble already.
Either I don’t know what the URL of this Bubble provided Stripe webhook is, or there isn’t one as Bubble does something different.
You have to simulate a failing scenario, have a look at the page provided before. The test plan’ setting could be different that your live plan, but that would bring a good overview of how that works and what kind of webhooks/statuses you’ll get from Stripe
This is true. After I bailed on not using webhooks, I watched a 40 minute tutorial video I found on YouTube and the total time needed to set it up, including watching the video was about an hour and a quarter.
In case anyone finds this thread and is interested, this is a good video tutorial:
The only lingering question I had is why do we not enable webhook authentication?
In this Bubble Forum thread, @emmanuel explains why it isn’t needed: