Forum Academy Marketplace Showcase Pricing Features

Stripe V3 Subscription Issue

Hi guys, need help with the Stripe connection for subscription purchases.

I have a workflow for the subscription process that worked fine in the past, but not anymore, and I can’t figure out what exactly changed.

I have a multi-step workflow:

Subscribe user to a plan → Create object A → Update current user

When I use V2 checkout - everything is great, and the full workflow works fine.

However, if I switch to V3 - workflows never get to a step 2 in the workflow:

  1. The stripe checkout page opens
  2. User inputs payment info
  3. Subscription is created successfully on a Stripe side
  4. User is redirected to index page
  5. The rest of a workflow never runs

How do I fix this? I tried splitting a workflow multiple different ways, using custom methods and backend workflow - it’s all the same, after successful V3 checkout - the app doesn’t remember it was in the workflow.

Bonus question: What is the best way to insure there is always only 1 subscription per customer? Should I manually search and delete any old subscription? Or should I update the existing one during Step 1 in my workflow? Thank you!

Hey @extysolutions :wave:

This gets pretty tricky. Fortunately, Bubble handles a lot of things for us to make it a bit easier.

Instead of finishing the workflow after the Subscribe the User to a Plan, you can add another workflow that runs whenever a condition is true.

You can do something like this:

When Current Users Stripe Customer Subscription Status is active and Current User’s ‘FirstTimeSet’ is ‘yes’ then do the workflow that you want. If you aren’t aware already, the Current User’s Stripe Customer Subscription Status is already built in with Bubble when using the Bubble Stripe Plugin.

You would just add another field on the user datatype called ‘FirstTimeSet’ that is by default ‘yes’. Then in the workflow, just make sure to turn it to ‘no’, at the end, so it doesn’t run again in the future.

You can also do the same thing with Stripe webhooks, but I find that the initial setup sometimes has issues. After the initial setup, the webhook workflows after that should be fine.

Example Editor: Test805421 | Bubble Editor

Hope that helps! :blush:

@j805 www.NoCodeMinute.com

For All Your No-Code Education Needs:

  • One-on-One Tutoring
  • eLearning Hub
  • Video Tutorials
1 Like

Thank you for suggestion! This sounds a little bit complicated and although would work as a solution, I’m trying to figure out simply how to make the Workflow to continue after V3 step.

Think of a scenario - After collecting payment I want to go to “Thank you” page.

But after collecting payment Bubble forgets that it was in a workflow.

Yeah, I am pretty sure it won’t continue afterwards. I think that is a difference between v2 and v3. Maybe @eve can verify for us. :blush:

Well, the thing is - it somehow DOES work on my live version.

I have been heavily refactoring the app, nearly 80% of components reworked from scratch, including billing system I’ve built.

The thing is - previous system (live) still works on the website with V3 and continuing the workflow.

I copied it exactly and tried to reproduce on version-test - no luck. So I’m wondering what could be a potential triggers of this inconsistent behavior.

@J805 are you 100% sure that the “subscribe to plan” must be the last step in the workflow?

I’ll put up some screenshots of how I got mine to work – Headed into a meeting. Stay tuned :slight_smile: If I am understanding your question correctly, I have a solution @extysolutions

1 Like

@extysolutions Ok, the magic here is simply doing a “Result of Step X”.

Here’s what I do:

Step 4 of my workflow is to actually subscribe the user to a plan.

I have 8 other steps that I want to run AFTER I subscribed the user and they come back to the website. (Purple is before they are subscribed, Pink is AFTER they are subscribed and come back)

So, in Step 5, 6, 7 and beyond, I used “Result of Step 4 is not empty”.

A bit tedious, but it’s been working for the past 5 months perfectly for me. There is a bit of a delay in workflow execution when it comes back from Stripe (maybe 2-3 seconds)… but oh well.

Hope this answers your need.

Thanks for explaining.

This is exactly how my current (Live) setup is built.

But when I am currently trying to reproduce this system - I am getting different behavior.

To show it on your example - after user successfully pays: instead of running step 5 with conditions - the app redirects to index page and exits the workflow like it was never there.

If you were do do step-by-step debug mode, would your workflow get to step 5? Because my never lends there.

Yeah, it goes to Step 5 in step by step mode once it comes back from Stripe… (Create Billing [Dev] is my Step 5).

There has to be something else going on for it to shoot to index.

Make sure the user exists and they are logged in before subscribing… and maybe there is a redirect somewhere? Perhaps the user needs to be confirmed? I’d check the below setting in your Bubble…

I don’t think putting it as the last step of the workflow will work since it will always run the first part of the workflow even if the user doesn’t pay. I don’t think that is what you want. Maybe Result of Step x will work like @w.fly is suggesting. :blush:

Weird! Thank you for sharing a screenshot - that’s exactly what I was afraid of =) Okay then, back to the drawing board.

It also worth mentioning that I am doing all this from a reusable element that is not always visible on the screen (I have a “pricing” popup, and if the user opens Stripe checkout and comes back - the popup is closed already). Dunno

Update: Now I know 100% what the issue is.

The workflow breaks if the reusable element is placed in the Popup.

When the reusable element is on the page directly - everything works

When the element is inside the popup - only the first step (subscribe customer) works, but no other steps are executed in the workflow.

Does anyone have suggestions?

Interesting! Yeah… I can see how that wouldn’t work. I had a fear about that when I was developing my app.

What I had started to look into was how to “capture” the fact that the user was just redirected from Stripe, then run a workflow based off of that. I believe there is something passed in the URL when the user comes back from stripe… but it gets erased quickly as I believe Bubble auto-redirects and empties out the URL parameters. I’d start there if I were in your shoes. I don’t imagine this’ll be easy though :confused:

my thoughts exactly :\