#sir-paymentmethod-update
1 messages · Page 1 of 1 (latest)
@marble furnace If you have a PaymentMethod pm_123 you can call the Update PaymentMethod API https://docs.stripe.com/api/payment_methods/update and pass the new address in billing_details
sir-paymentmethod-update
But that would require me to send the address to my backend and process it there, correct?
correct not other way than doing that
I saw that when tokenizing a card element I can pass an address object like here: https://docs.stripe.com/api/tokens/create_card. Does that update the billing address or only apply to the card for connect and tax purposes?
I think you might be mixing up multiple completely separate concepts here. A Token, a Card, a PaymentMethod are all completely separate API Resources and all work differently.
If you are using PaymentMethod (the pm_123456) in the API, then Card and Token are completely unrelated/separate
Aren't tokens supposed to be used to attach new credit card information to a payment method without processing any sensitive data on non stripe servers?
Not really no, that's a vocabulary mix up I think. Yes a Token can be created client-side to collect card details securely and get a Card Token tok_123. But so can a PaymentMethod (pm_123).
If you are using PaymentMethods and PaymentIntents then you would never look at Card Tokens.
@marble furnace does that make sense?
Yes, I guess. Its just confusing that the web elements do not provide an update functionality but just a create functionality for payment methods. It looks like the correct flow to update the card or address for an active subscription is to create a new payment method and detach the old one I guess?
If you are collecting brand new card details from scratch then yes that's what I would do. If you are just updating the address then I would use the Update PaymentMethod API I mentioned earlier, where you send the address to your server and then call that API to set the new one
Okay, and what would be the flow to update payment information? I dont want to break PCI compliance by sending any credit card information to my server.
What you were saying earlier. In that case you create a new PaymentMethod pm_123 and attach it to the Customer for future payments and detach the old one (or keep both)
Okay, many thanks for your patience and explanation. I will try my best at implementing it. Have a nice day 👍
Sure thing, have a great day too!