#SeanH20-payments
1 messages ยท Page 1 of 1 (latest)
2 is the better option
you can update the existing PaymentIntent to set setup_future_usage so that it saves the card used to confirm it(per https://stripe.com/docs/payments/save-during-payment) and then confirm it with a new card via confirmCardPayment in the frontend as normal
ah i see, ok, i'll give that a go. it's odd because i was using Setup Intents, so i need to make a new page for paying this Payment Intent and save the card for later. I think i understand, i'll give that a go an see how it works.
thanks for you help! ๐
@quiet isle the issue is i'm getting this error when creating the payment intent -- You cannot confirm with the off_sessionparameter whensetup_future_usage is also set on the PaymentIntent because you cannot set up future usages when processing payments off-session. - so how do i pay that type of payment intent? i need to add a new card for future usage?
you wouldn't be confirming on the server side again with off_session so you shouldn't be getting that error
if I undestand you, the flow you want is
- create PI
- confirm with off_session on the backend with saved card
- it fails
- contact customer and bring them to a payment page
- update the PaymentIntent with https://stripe.com/docs/api/payment_intents/update?lang=node#update_payment_intent-setup_future_usage
- call https://stripe.com/docs/js/payment_intents/confirm_card_payment#stripe_confirm_card_payment-with_element
i see, my question / concern is -- when a new card is added via this way, is that card set up for future use too? so can it be used for a Payment Intent in a months time?
it will be if you update the PaymentIntent to have setup_future_usage , yep
you either use SetupIntents to save a card if you're not charging it now, or you use a PaymentIntent with setup_future_usage if you are charging it now, they're equivalent in that regard
i see, so i need to create a new page with a card element, and then pop that in the js for this payment intent, after updating the payment intent. i'll give that a go ๐
That's all working great this end! Thank you so much for helping me with that, I was a bit confused by the flow. The key thing was to call update on Setup Intent to flip it too a use for future. Cheers!