#Benoît
1 messages · Page 1 of 1 (latest)
you can get the ID from last_payment_error and pass it back in when confirming again
Oh great ! Thank you, i check this !
I've got an error when using the pm ID of the last_payment_error
"The provided PaymentMethod was previously used with a PaymentIntent without Customer attachment, shared with a connected account without Customer attachment, or was detached from a Customer. It may not be used again. To use a PaymentMethod multiple times, you must attach it to a Customer first."
Then the PM mustn't have been attached to a Customer. They're single use in that scenarion. You'll need to re-collect payment info from the customer and re-confirm
Yes, when i make a 3D Secure payment and fail it, the card is not saved, that's why i asked if i could use the card datas that was used for the failed payment, to avoid asking the customer to re-collect the card datas
Then you cannot, no
Ok
It needs to be saved/attached to be used more than once
And a payment attempt (followed by a 3DS request) counts as a usage
Ok,
Could the collected card datas be stored before trying to make the payment ? I could then allow my customer to restart the payment process from his previous card
Sure, you can save it during the payment process: https://stripe.com/docs/payments/save-during-payment
I don't understand the difference between this tuto and what i've already done in my app
Can you share a pi_xxx where unable to re-use the PM?
My problem occurs after all this, after i fail the 3D Secure validation.
So in my app, i see that i have an incomplete payment, that i would be able to restart some days later, without having to re-collect the card data. I would like to reuse the card data that have been filled by the customer days ago. As it's a 3D Secure card, it's not saved in Stripe.
Or maybe i missed somthing
Yes
pi_3NQqfxAYYvne95SH2Kdg3cP3
And i try to restart this payment by passing the pm ID pm_1NQqg0AYYvne95SH41B0gpYx
Ah, ok. I guess we only attach after a successful confirmation
I see a little difference with my existing code. I don't use automatic_payment_methods: { enabled: true, } when creating my PI, as i don't create it myself, it's created automaticaly with the invoice i create
What you want to do seemingly isn't possible. You'll need to provide a new pm_xxx and re-confirm
Ok
Ok i see, i will see to add the Payement Element form again for my customer to be able to restart his payment
Should i use then confirmCardPayment() or confirmPayment() ?