Forum Academy Marketplace Showcase Pricing Features

Stripe - How to validate if subscription is active?

Hello,

I have monthly subscription plans tied to my app. The user create their account before they subscribe to be able to save their credit card information for a subscription. How can I pull the information from stripe that payment has been made and is active so I can activate/deactivate their account if payment was, or wasn’t, made?

This is the current workflow. The ‘Make Changes’ is the type of account they signed up for, if they click on the textbox or not. Bubble doesnt pull the ‘make changes’ workflow if it is after the stripe subscription workflow.

I’d appreciate your assistance. Thanks!

You can do this using Stripe API and webhooks…webhooks alone might be sufficient for your needs.

Can you elaborate at all with examples of how to do that?

@placolla13

Seems you are using the Bubble Stripe plugin.

If so then check for current user stripe subscription status and build logic accordingly.

Checkout the different subscription statuses in the stripe api docs. Some of them are “active”, “trialing”, “unpaid”, etc. (look for the subscription object)

Thank you @cmarchan for elaborating!

I went ahead and created the subscription check and if they user is not active then they get redirected to a page that is meant for the customer to update their credit card information. I downloaded the stripe js2 plugin but not sure exactly how to add that functionality. Do you have any suggestions?

@placolla13

@copilot Stripe courses below: