#Richie-Checkout-cart
1 messages · Page 1 of 1 (latest)
Stripe would not automatically cancel the previous Checkout Session and I don't think there is a way to cancel the session via API or Dashboard
It is worth noting that customer won't be on the hook for anything unless they complete either of the Sessions.
What are you trying to achieve with this cancel? I will see what we can do for that
So is it even possible to create a second Session with the same client_reference_id?
I guess it wouldnt be that big of a deal if it didnt get canceled
because we are doing the "manual_release" way
so if the customer did enter cc and complete both sessions
then we would catch it
just seems like a better workflow if we somehow cancel the frist one
i know how to cancel the paymentIntents on the first one
Yes I don't believe there is a restriction on two Sessions having the same client_reference_id
initially we were going to re-use the open session but your docs specifically say we should create a new session for each payment attempt
or could I somehow DELETE the old session?
i also see this "expires_at" field, could I set that to some time in the past so it's "expired"?
Unfortunately there isn't really a method for updating a session either so I don't think you can update expires_at
Let me think on this for a minute and get back to you
thanks a lot
I will just add that, if there is really no other option, then I guess we could use a more unique "client_reference_id" (like 'abc-1', 'abc-2' etc) and then we could just only authorize the release for the most recent one -- but I would still like to see if there's a better way because it would be easier for us if we could just use 'abc' which is our internal order id
So you are right that you can cancel the payment intent if it has not been paid yet (though I have not tried this specifically with Checkout) one thing you may be able to do is watch the payment_intent.created event and see if a PaymentIntent for this client_reference_id has been created and cancel the previous one
hmm yeah so that would help clean things up a little if we canceled the payment intent on the old session. we would still have to crearte a new session, that's fine. and we would have multiple sessions with the same client_reference_id but that should be fine, because all the others would have the payment intent canceled. ok i think this works. haha just thinking out loud here. thanks a lot for your help