#ml74.

1 messages · Page 1 of 1 (latest)

uncut frigateBOT
tepid iron
#

So you want to cancel a payment intent if the payment doesn't succeed in 10mins?

mighty jungle
#

Effectively, yes.

#

So once we're ready to purge the basket on our side, we would just cancel the payment intent and it wouldn't allow the payment to succeed from PayPal/Klarna/etc?

#

How does this end up looking for the user?

#

I suspected killing the payment intent would be a brute force way of ensuring no payment could succeed, but wasn't sure if there was a smoother way of handling this that didn't result in the user being left with the impression that something was broken.

tepid iron
#

Ok, an error will be thrown if you confirm an already canceled payment intent . You can try it out in test mode.

mighty jungle
#

Ok, I'll give it a try!

#

Actually, on that same topic. Is there an event that we can listen for to throw a notification right before we redirect to the third party payment provider?

#

It might be useful to inform the user that they have x minutes left to complete their payment before their basket expires.

tepid iron
#

That's entirely up to you, you can implement your own timer and inform your customer about the time limit.

mighty jungle
#

The redirect seems to be handled by stripe.handleNextAction() though

#

Is there any way for me to know when it's about to redirect, so that I can fire a notification?

tepid iron
#

Whether a redirect is needed or not, you can always inform your customer about the time limit in your own page. Why do you want to notify them when they are about to be redirected?

mighty jungle
#

The timer is visible on the page for them up until the point they are redirected. I think a notification would make it clear that they still need to complete whatever information is required on this third party site within the given time, otherwise they’ll lose their items. Since once they leave our site any reference to that timer is gone.

#

I’m thinking of cases where they redirect to PayPal and spend 5 minutes trying to remember their login, not knowing that they still need to make payment before that timer ends.

tepid iron
#

If that's the case, why do you still want to give a time limit?

mighty jungle
#

Because we will still purge the basket. The concern is communication to the user about the time limit.

tepid iron
#

I'd rather display the limit in the very beginign. If you only display it right before the redirect, your cusotmer will most likely miss it.

#

My personal opinion is that it's not necessary to impose such time limit during payment. You can always run a daily cron job to cancel the un-attempted paymentIntents at the end of the day.

mighty jungle
#

We have the time limit running as a countdown clock on the page, so it's visible throughout.

The time limit is required because of the products that we're selling. Limited inventory and high demand, so there's a queue of people waiting for every item that's sitting awaiting payment, unsold in a basket.

The challenge here is trying to get this to a point where it works without being extremely frustrating for the user.

#

Like I don't know how long it takes a user to go through Klarna's registration or credit application process. So if they get the whole way through that and then we display a message telling them "tough luck, your basket timed out", it's not going to be a great experience for them.

#

Does the payment intent receive any ongoing update from these payment providers that we could leverage to see if the user was still active on their side?