How to handle subscription management with Stripe in Bubble?

Hi everyone,

I’m currently integrating Stripe into my Bubble app for subscription payments, and I’m a bit confused about how to handle certain scenarios. Here’s my setup:

When a user purchases a yearly plan, I store the ending_subscription_date in the User database.
For monthly plans, I also store the ending_subscription_date after the first payment.

Now, I have a few questions regarding how to properly handle updates and status changes for subscriptions:

  1. Do I need to set up a backend workflow with a Stripe webhook to update the ending_subscription_date after each successful payment for monthly subscriptions? For example, should I listen to Stripe events and update the end date monthly after each billing cycle?
  2. Should I create another backend workflow to handle failed payments? For instance, if a payment fails, should I update the user’s subscription status (e.g., make it inactive)?
  3. How do I handle cancellations? Do I need a separate backend workflow to update the user’s subscription status when they cancel their subscription?
  4. Should I create a workflow to check when the ending_subscription_date arrives and automatically cancel or deactivate the user’s subscription status?

I just want to make sure I’m handling these scenarios correctly. Any advice, examples, or best practices would be greatly appreciated!

Thank you so much!

FWIW: I configure a single Stripe webhook and a single associated backend workflow to handle all the scenarios you cite.

Can you explain how to do that? THANK YOU!!
Do you use the “invoice” events in Stripe for those cases or a different events?

I configured the webhook for the customer.subscription.updated and ....deleted events, although I think just ...updated might suffice.

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