Stripe V3 SCA Workflow

Just a quick one.

I have a current app which subscribes users to a plan through a workflow after a user clicks a button.

The workflow is:

Subscribe to plan > Make changes to user > go to page XYZ

This works great with the V2 and works as expected.

When I switch the plugin to V3, it behaves differently. Obviously there is the stripe checkout page (I actually prefer this!). That is fine.

The issue that is happening is the rest of the workflow is happening irregardless of the stripe step.

So basically, with V2, the user can’t get the plan benefits which come from subscribing until the result of step 1 in the workflow (subscribe to plan) is successful. (How you’d want it!)

With V3, it’s simply redirecting to the checkout and then the workflow proceeds with step 2 “making changes to user”. It in essence should not be proceeding to the second step until the checkout is a success right?

Is there a way to prevent the premature action of the V3 workflow for my simple setup?

Thanks in advance.

Hi @dan8

It should probably be a completely separate workflow that you set to run only when you get feedback from Stripe that the process completed. So workflow 1 will be on button click and sends data to stripe and workflow 2 is triggered and gets feedback from stripe and then continues the rest of your process. I haven’t used v3 and use stripe.js but usually that’s how I handle stripe payments to ensure they actually went through.

Hopefully that helps

1 Like

I guess there are quite a few things I should be doing as triggered workflows then! I built them into actions on pages as I thought this was fine but it breaks with V3.

Thanks.

I have the same setup as you @dan8, and I’m not sure if I should be waiting for any update or update my workflows (split them into 2). How do you trigger a workflow based on Stripe feedback of successful or non successful payment?

Hi Kris, I resolved mine by just adding some “Only When…” parameters to the workflow on the steps after the “Subscribe user to…” step.

As a result, my additional steps now don’t trigger unless there is a valid subscription ID. Hope that helps.

2 Likes

I just spent an hour and a half banging my head against the wall trying to figure out where my data was being set, and this is the reason. Why is this done differently from v2? @marca is this a bug?

Ok so applying the fix exposed two new bugs…

  1. It takes about 5 seconds after returning from the stripe portal before the workflow finally registers that it should run
  2. The page redirect in my workflow is being handled in a buggy way. The workflow:

Subscribe user to … -> trigger custom event (If result of step 1 is not empty)

Custom event:
Make changes to current page item - unrelated fields -> go to page X send parameter I (if current page item’s IMPORTANT FIELD is not A) -> Make changes to current page item - IMPORTANT FIELD = B) -> Go to page X send parameter J

And yet, somehow, the page item’s IMPORTANT FIELD is being set to B AND the page is being redirected with parameter J. I put a test counter (make changes to item - count field = count field + 1) and it’s only being increased once, so somehow the code for V3 is causing the workflow to run BACKWARDS (or at least in parallel…).

Hi dan8!
The best way is to use the stripe’s webhooks in your Backend workflows. You can customize as many as you want at your stripe account. Then you will have all the info updated directly from stripe