#Ammar - 3ds
1 messages · Page 1 of 1 (latest)
hey there can you share an example confirmation request ID I can inspect?
https://stripe.com/docs/api/request_ids
eg: req_12345
Sure, 1 sec
req_VIkdtocCuit351
This is an off_session payment.
And I want it to fail and throw the exception, its just I then need to re-confirm the payment_intent client side when I get the customer back on session to complete 3DS for the transaction.
Any idea how to do this @jagged canopy ?
Looking, thanks
ah
With off session payments you won't get requires_action since you've indicated the customer is not present
So you have two choices:
1/ Keep using off-session, and upon decline (payment intent reverts to requires_payment_method)you get your customer on session and confirm the payment client side
2/ Stop using off-session and if the response leads to requires_action you similarly get your customer online to confirm client side with with the PM already set on the PI
How do I go with option 1?
I have the following code:
stripe.handleCardAction()
I am assuming I have to use a different method?
For path 1/ you'd use confirmCardPayment and provide a payment method either as a card element or an existing payment method
Meaning I create a whole new payment intent?
Nope, you can use the same payment intent / client secret
You just need to confirm it again with the customer online to handle those auth actions
Ah, in that case do I need to pass the payment method?
Yes, you can either provide the PM id or a new PM by providing a card element that your customer has filled out with new payment details
Hmm, the docs say the payment_method is optional?
It's optional at the request level, yes, but the payment needs one in order for you to confirm it
Not sure I understand that? Why would it not be required if I NEED it?
It can be supplied in several different ways. It's not required at the request level, even though it is required overall.
You can create a payment intent without a PM, update its amount or description perhaps several times, then provide a PM later before you confirm it.
Is there anyway to get the payment method used last time from a payment intent that has failed off_session?
You should probably be able to find that information in last_payment_error.payment_method on the Payment Intent (see https://stripe.com/docs/api/payment_intents/object#payment_intent_object-last_payment_error-payment_method)
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.