#nacho-customer-paymentmethods
1 messages · Page 1 of 1 (latest)
Hi there 👋 what are you running into troubles with when trying to do this?
I want to edit the payment method, on my application user can add multiple payment methods
Edit what about the payment method exactly? Something that isn't shown as an available field to be updated?
https://stripe.com/docs/api/payment_methods/update
Did you try to use that endpoint and run into errors?
The card or the billing address
Those are two pretty different things. You can update the billing address through the API, as shown in our reference that I linked to. You can't update card details that way though, you will need to create a new Payment Method if you want to collect new card details.
Ok I understand, so creating a new payment method how can I use that new one to replace the existing payment method
Replace it where? Where/how are you using the previous one?
I'll need more insight into how you've structured your integration in order to provide guidance about it.
Ok user can add payment methods which is being stored on stripe to a customerID, I want to be able to edit any of the cards I sent to stripe. Creating a new payment method means adding another to the existing array or can a customer only have one on stripe ?
Customers can have as many Payment Methods as you create for them. If you're setting a default for use with Invoices and Subscriptions, then they can only have one default set.
I know you can have one default set, you still don’t get me that default how can I change the card details in that or do I have to delete and add another
I saw something about adding a new payment method and it being tokenized how can I achieve that. I believe I can send that token to the backend and replace the payment method
You have to create a new Payment Method if you want to change card details. Then if the previous Payment Method was set as a default and that needs to be updated, you need to update the Customer (or Subscription object depending on your integration) to set the new Payment Method as the default.
Ok what about this
You already have a flow for creating Payment Methods, right? The one you described in your initial message, you should reuse that.