How to cancel a PaymentIntent generated with Checkout Session in Stripe?

326 views Asked by At

I can't figure out how to cancel a PaymentIntent created with Checkout Session.

When I call PaymentIntent/cancel through the API, it doesn't get cancelled and throws the following message:

"You cannot perform this action on PaymentIntents created by Checkout. Try expiring the Checkout Session instead. See https://stripe.com/docs/api/checkout/sessions/expire for more details."

In accordance with the message, I'd like to expire the Checkout Session, but the status of the relevant Session is kept 'complete' thus I cannot expire it.

This Checkout Session is for a bank transfer payment in Japan, waiting for deposit from the customer. In consideration of the possibility that the customer may change their mind, I would like to implement a function that allows the customer to cancel while it's still in the waiting for deposit status.

Do you have any suggestions for resolving this issue?

--

I apologize for the error in my description. The status of the Checkout Session is not 'open,' but 'complete'

0

There are 0 answers