#silkmilksilk-intent

1 messages · Page 1 of 1 (latest)

mild sorrel
#

Hi! a bit confused because you say SetupIntent and then later PaymentIntent, which is it?

Do you mean you're charging the saved card from a SetupIntent, using a PaymentIntent with off_session:true?

#

if so, yes, if there's a decline for off session payments, we detach the PaymentMethod from the Intent (since the expected action is that you handle the decline by reaching out to the customer and we leave the PaymentIntent in a state where you can have a page that collects a new card, for example).

#

do you have some examples I can look at like Payment/Setup Intent IDs?

torn hare
#

Sorry yes!
I'm using the setupintent to save a card, then charging it later with a payment intent

#

Yess.. this is an example i've recently run pi_3LOJ4nFlWrS9Xt7Z0AzOB0qp

mild sorrel
#

yep, so if a decline happens the PaymentMethod is detached. You'd need to pass it back in as payment_method on the paymentIntents.confirm() call if you want to try to charge the same card again

#

it's different on the frontend because the library is doing that (when you call confirmSetupIntent or confirmPaymentIntent in stripe.js it's passing back in all the card details from the Element on the underlying call to the confirm API each time)

torn hare
#

OOooh ok gotcha that makes sense. I didn't realise I could pass in the PaymentMethod when confirming, which if I do, means I don't need to attach it when creating the PaymentIntent and allows my users to simply retry continuously (if they add funds for example).

#

thanks for the help!