#dino_pephanis-payment-intent

1 messages ยท Page 1 of 1 (latest)

calm barn
#

Hi ๐Ÿ‘‹ are you actually looking to do a sort of rollback, or just try to process the same request again in case of a failure?

sleek rapids
#

yes - if I try and process the payment again i get This PaymentIntent's amount could not be updated because it has a status of succeeded. You may only update the amount of a PaymentIntent with one of the following statuses: requires_payment_method, requires_confirmation, requires_action

#

So if there is an error processing the payment in our backend to rollback/reset the PaymentIntent so that it can me processed again

#

can I update the status?

calm barn
#

No, succeeded is a terminal state for Payment Intents, and signifies everything is in place for the payment to happen and the funds are preparing to move.

rare mica
sleek rapids
#

OK - in StripeJS is there and alternative to confirmCardPayment where I can check the card details, process 3DS2 if required, throw any errors otherwise allow the process to continue so that I can confirm Payment in our backend once everything is correct

sleek rapids
calm barn
#

Yes, idempotent functionality is available for everything in our API. You essentially send us the exact same request, and we process the request as usual unless it's not the first time we receive it, in that case we then return the same response that was returned initially.

You can use handleCardAction to only handle the authentication part of the flow and then confirm the intent from your server, this guide walks through that flow:
https://stripe.com/docs/payments/accept-a-payment-synchronously

Learn how to confirm a payment on your server and handle card authentication requests.

sleek rapids
#

Thanks - will have a look at that