#dino_pephanis-payment-intent
1 messages ยท Page 1 of 1 (latest)
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?
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?
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.
https://stripe.com/docs/api/idempotent_requests might be useful here?
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
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
Is that available with PaymentIntents and can I pass that a connect account & idempotency_key
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
Thanks - will have a look at that