Make the new Stripe redirect url available

@Teodor @patrick
FYI the Stripe tech specialist added the following info, which may make the setup easier:

Also… as a note we recently started returning the redirect url server-side on session creation (https://stripe.com/docs/payments/accept-a-payment#redirect-customers) so you don’t even have to use stripe.redirectToCheckout anymore… you could just use that redirect url itself and this would clean things up here if you want to use that instead.

Indeed I do see the url in the session.create response.

I have no experience with Stripe Connect, so I hope we can somehow get this all working for you. I don’t see an option for the connected account in the redirectToCheckout (https://stripe.com/docs/js/checkout/redirect_to_checkout), I believe that the needed headers should be created by the Stripe SDK when you have set the connected account on the stripe instance.

The server-side method should probably be possible with server connect, not sure why they use the 303 status with the redirect. When you redirect server-side you should not use the serverconnect component or form, those will do a xhr request and not redirect. Instead use a normal form or link.

You could also do the redirect client-side with the browser component with the redirect url that was returned.

Thanks but not sure I get it.
I (want to) use the server side session create with pre-build checkout. In the response:

"url": "https://checkout.stripe.com/pay/cs_test_a1Lli8exsVFYqawOXT3OqDK2oFHHt6qV6WOhvdNeBXVObap19lguUE4bv1#fidkd[...]wYHgl"

Url does not appear in the dynamic data picker, how do I fetch it and use the redirect as advised by Stripe specialist?

When the url is added recently to the api then it is possible that we don’t have it on the UI yet, you then have to type the expression yourself. We use the Stripe OpenAPI Specification (https://github.com/stripe/openapi) to generate the UI and stripe actions.

I’m not a coder myself so this is Chinese sorry :sweat_smile: What is that expression and where/how to use it?
Who can help me out here with this single step @Teodor ?
When do you guys return to office for upgrading the create session component?
Thanks

Hello,
What do you suggest so we have some hope to move forward? With 200+ views on this post :open_mouth:, seems like the matter interests quite a few people and a solution or fix would be welcome by the community.

Hi again,
No fix yet, we’re waiting patiently, although I’d appreciate a confirmation that a fix is planned (sometime in August @George?) This is what’s needed:

Stripe started returning the redirect url server-side on session creation (https://stripe.com/docs/payments/accept-a-payment#redirect-customers ) so you don’t even have to use stripe.redirectToCheckout anymore… you could just use that redirect url itself

Not really sure what kind of fix do you expect here? Why not follow Patrick’s explanation:

What is that needs to be ‘fixed’ here?

Maybe ensure in the session create component that the concerned url is in the UI for easy dynamic data pick? Unless someone can help me “type the expression myself” because I don’t know how to do that.

Where exactly in the UI does that need to be used and where from the UI is it coming from?

Patrick was the one mentioning it, in response to Stripe tech’s new instructions: “we recently started returning the redirect url server-side on session creation (https://stripe.com/docs/payments/accept-a-payment#redirect-customers ) so you don’t even have to use stripe.redirectToCheckout anymore… you could just use that redirect url itself”
Currently, my checkout flow does not get redirected to the url generated by the session create.
That url, at which user enters cc details:

Is this on the client side or on the server side in the server actions?

Server side, using the create checkout session component.
Currently can’t fetch that url and/or Stripe can’t process the redirect. I can share a screenshot from the dev tool if that helps.

This apparently was the old method, now Stripe “recently started returning the redirect url server-side on session creation (https://stripe.com/docs/payments/accept-a-payment#redirect-customers ) so you don’t even have to use stripe.redirectToCheckout anymore… you could just use that redirect url itself”
(LOL I keep repeating that same key sentence - not sure someone on earth actually understands what they mean :sweat_smile:)

So do you have access to this whole data when you submit your payment? Is it available on the clienside? You can do the redirect there, accessing this property.

I’ve moved this to a new topic because it concerns a new functionality not available yet.

I have access to the whole response data except the url generated by the session create api. So I can’t use the ‘browser’ on client side to fetch that url.

If it is already in the stripe response then you can just use it in the expressions. You just have to type it manually.

Will see if we can add it to the data pickers later on.

Thanks but which expression to write?
How and where?