Unable to get Stripe Billing Portal Session to redirect

So I’m running into the same challenge as @cgrulke did.

The Create Billing Portal Session is supposed to send the user to a Stripe portal page after a form submission - similar to the Checkout Session in the Stripe Subscriptions process.

I tried to follow the same process when setting up the Create Billing Portal Session, but for some reason after submitting the form on my page the redirect does not happen.

image

I can see the url that I’m supposed to go to in the form’s response, but I’m not automatically taken there like I am for the subscription action.

I’m not sure, just guessing here, but could it be that your redirect url is not https?

If I’m reading the dmxStripe.js file correctly, then I think this is how the Checkout Session redirect works in the Stripe Subscription process.

dmx.stripe.instance.redirectToCheckout({sessionId:e.id}) NOTE: Stripe is stating this is a deprecated action. Hopefully Wappler team can update this before it stops working.

I’m not finding a similar set of code or anything that references the Billing Portal Session in dmxStripe.js.

Thanks, Brad. The url in the response is https. That should be where I get redirected. To me it’s looking like something is missing in Wappler’s integration. I’m expecting this to function similarly as the checkout session, but the implementation will be different since it needs to redirect to the url provided in the response.

Since the URL is returned in the response, I decided to use a browser goto for this. Not sure if that is a workaround or the expected method, but it allows me to send the user to the billing portal.

1 Like