#verymike-checkout-cancelled

1 messages · Page 1 of 1 (latest)

brave trellis
#

@tame egret I'm confused, if the session is cancelled there's nothing to redirect to.

tame egret
#

hm

#

so when user click this <- Back, the session is dead and there's no way to get back to it?

#

I mean I am retrieving the session and there's something in there. So is there a way to get back to this session?

brave trellis
#

Ah that's a completely different flow okay

#

if they click that button they just go back to your cancel_url but no the Session is not canceled, in that case you can always redirect them to the same URL you did the first time

tame egret
#

uhmmmm how

#

when user clicks buy now it goes to stripe.session.create

brave trellis
#

How do you send a customer to Checkout today in the first place?

tame egret
#

yes

#
const session = await stripe.checkout.sessions.create({ // stuff )}
res.send(session.url)

and so client redirects to this url

#

but when I do stripe.session.retrieve({{session_id}}) I can't see url property in there

brave trellis
#

huh

#

let me check

tame egret
#

it's null

brave trellis
#

I just tested and it's right there for me

#

Is the session already expired/canceled for real? What's the Session's status?

tame egret
#

I guess I am dumb enough to do so

brave trellis
#

that Session has already been successfully paid, there's no reason to redirect the customer to it

tame egret
#

I know.... I see. That's why I said I am dumb enough

#

I was trying to build a cancel page using the object of completed session

brave trellis
#

ah gotcha, nothing dumb there, there are many parts of the API to look at that are inter-related but not well documented 😅

tame egret
#

basically the same session I was using for building success page

brave trellis
#

makes sense!

#

verymike-checkout-cancelled