#mindsetinmeta
1 messages ยท Page 1 of 1 (latest)
Why? My understanding is yes that means the payment is succeeded
because in the documentation, I realized it asks us to also check whether the payment is successful or not
so after the checkout.session.complete, we do not have to call PI.status to see if it's succeeded?
Oh that's only for async payment methods
aka delayed notification payment methods
If you are using them, yes you would need to listen to 2 more events below. But ie. if you only use card then checkout.session.completed is equal to payment succeeded
got it
thanks
another question Orakaro
we are developing a reserving system of people's time. that is, if a buyer pays for a seller's time slot, that time slot is reserved and is not available for others.
then there comes the problem.
when buyer A pays and reserves a seller's time, we put the time slot in reserved status before creating a checkout session. If A never completes the payment, we will have to put the seller's time slot on hold until the CS expires in 24 hours.
what's the best practice here to end the buyers' CS so that the seller's time slot can be freed up?
I think when A never completes the payment, you can treat it as A never take that slot and you don't need to put the seller time slot on hold. If in next 24 hrs another buyer B took the slot then that it is, B won the slot
But it's just my suggestion, it is more of the question how you would want to design your service ๐
Basically if A never finish a payment, the Checkout Session status doesn't change, as it's like an openly "door" for everybody to pay and enter
open for 24 hours
righ
right
I would like to understand that, what's the average time duration for a buyer to complete a payment. If say, 80% buyers complete the payment in 5 minutes, then we can make an API call to expire the CS after 5 minutes so the time slots can be available to others. Do we have that magic number?
But how can you calculate the start time of that 5 minutes?
once the customer clicks on "make a payment", we create the checkout session. that's the time we start counting.
I see. Unfortunately there is no such guarantee or a magic number. It's totally up to you to communicate with them "5 mins to complete or we will take back the slot" tho
It largely depends on what PaymentMethod they used. ie card could be quick, but some other Payment Method requires a delayed time
agreed.
how can we know that buyer is keeping the checkout session open or has left the session, for example, closed the checkout web page.
is it possible?
no as I am aware of
Completely personal opinion but I think 1 hour is reasonable, taking consideration that expiration is 24 hours
cool
should we listen to PI events as well to tell whether the customer is trying to pay or has left?
this status can't tell if they has left or they just started and still on the Checkout Session page.
Will be the same requires_payment_method
right
hmm...
so it's a guess work then ๐
if the customer is on the checkout page and we fire an API call to mannually expire that checkout session, the doc says the user will see a message but will they be transferred to the checkout_session.cancel_url?
No I don't think so. You can test it in Test mode too ๐
if we manually expire the CS, will we get a checkout.session.expired event?
Yes