Good day,
I have currently setup my app using the Stripe plugin so that when my customers click a button it collects a payment and subscribes them to a plan (monthly payment). How do I go about making it so that when the payment is not successful it removes them from the plan?
I have never done this, but there must be a response from Stripe API that comes back to you whether the transaction was Successful or Not. Then probably somewhere from a workflow you should get this figured out.
If this wasn’t helpful at all, remember your post just moved up on a Forum Dashboard. Still a reason to like my comment
2 Likes
@Melior_Devteam
After you insert the " Subscribe the user to a plan" action you could insert a “Terminate this workflow” action with the following conditions:
1st. The result of previous step
2nd. Use one of these conditions:
I hope this helps!
Is this how it’s supposed to work?
@mateusproto
Thank you so just to gain a better understanding of the logic behind this. Every month when a payment is received ( based on my workflow) it will subscribe the user to a plan. When the payment does not go through the workflow will be 'terminated", this will remove the user from the plan?
@Melior_Devteam
Here you can check whether the subscription was successful or not.
But, based on the same logic, you can create a recursive scheduled workflow in which you will monthly check that the user’s subscription is active:
https://manual.bubble.io/help-guides/the-bubble-api/recursive-scheduled-workflows
Or simply, every time the user logs in, you can check if the subscription is active.