#Raene-paymentintents

1 messages · Page 1 of 1 (latest)

hard fjord
#

Hello! Writing out some answers now...

full shoal
#

Thanks

hard fjord
#

"If it's a new payment method I attach it to the customer via the attach payment intent method. "

What do you mean by the attach payment intent method? Do you mean the "attach a payment method to a customer" call (see https://stripe.com/docs/api/payment_methods/attach) ? Alternatively, you could also pass in setup_future_usage and customer when you create the Payment Intent and it'll be automatically attached for you (https://stripe.com/docs/api/payment_intents/create#create_payment_intent-customer)

#

"Also how do I attach multiple payment methods. Using the payment intent API. Do I just call the same method and it sorts that out?"

This wouldn't be with the Payment Intents API - you would attach them one at a time with this call: https://stripe.com/docs/api/payment_methods/attach

#

"Also how do I update a payment method. If say a user card expires"

This is something we can actually handle automatically on our end. Banks will let us know when cards expire and we'll automatically update them with the inforamtion they provide (see https://stripe.com/docs/saving-cards#automatic-card-updates)

Learn how to save and update card details to charge customers later.

full shoal
hard fjord
#

Gotcha - so that's the correct code, I just wouldn't call is the "attach payment intent" API. It's just attaching the Payment Method to the Customer, nothing to do with the intent

full shoal
hard fjord
#

Yup! off_session would be for things like Subscriptions or invoices that you are charging for immediately (without the user being on sessino)

full shoal
#

Okay. I think I get it. One last thing. Is there a card object that the front end can use to display to a user. You something like the last 4 digits. So the user can recognize the card they are selecting

hard fjord
full shoal
#

Okay thanks

#

So when you add a payment method. The response contains card details I guess I could save those too