#Omri-checkout-redirect

1 messages ยท Page 1 of 1 (latest)

slender cipher
#

Hey, can you share the Checkout Session ID? cs_test_xxx

slender cipher
#

yup, it's expired. They're only for 24 hours after creation

pallid cosmos
#

I use it only 1 or 2 second after I create it, maybe I did something wrong?

slender cipher
#

Oh my bad. It's been completed

pallid cosmos
#

why?

slender cipher
#

Because you've (or somebody) used the Checkout Session URL and completed the flow

#

They're one-time use

pallid cosmos
#

I need to call to redirectToCheckout before the user complete the flow?

#

ohh I think I understand

slender cipher
#

You need to create a new Checkout Session in this case

#

And then you can pass the ID to redirectToCheckout

pallid cosmos
#

I did it in different way, I just did window.location.href = session.url;

#

it is good way or I need to change it?

slender cipher
#

Nope that's fine too

pallid cosmos
#

ok ๐Ÿ™‚

#

when I call to session = Stripe::Checkout::Session.retrieve({ id: params[:session_id], stripe_account: @direct_debit.entity.stripe_uid, })

slender cipher
#
Stripe::Checkout::Session.retrieve(params[:session_id], {
  stripe_account: @direct_debit.entity.stripe_uid,
 })
pallid cosmos
#

๐Ÿ‘

slender cipher
#

Good spot! I'll fix, thanks!

pallid cosmos
#

๐Ÿ˜€