#corethings-list-customer-pms

1 messages ยท Page 1 of 1 (latest)

torn wind
#

Hey there! Yep, that's probably the wrong API in this instance. Checkout will instead create a Payment Method object and attach it to the Customer

#

Payment Methods are the newer API/object that work across pretty much all local payment methods (including cards)

lost grove
#

nice! Thanks for that. Just tried it out and it is now indeed listing the cards. However, I don't see a "default" payment method attribute with this object - is this correct? If there is no "default" attribute, how can I allow the user to set this if they have multiple payment methods (cards)

torn wind
#

Great! Indeed, that's not a default behaviour with Checkout. So you'd need to make an additional API call to update the invoice_settings.default_payment_method field on the Customer: https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method

lost grove
#

hmm .. If I'm listing all 'customer cards on file' to the customer, how do I show them which card is the default payment method?

torn wind
#

Good question! I guess you'd need to map the pm_xxx ID from the Customer object (invoice_settings.default_payment_method) to the corresponding Payment Method object from that list endpoint

#

There's no direct flag on the PM object unfortunately

lost grove
#

sounds good! Thanks so much for this - I think I'm good to go for now. (also - I'm x-Stripe and this developer support service is absolutely awesome ๐Ÿ™‚ Regards to the team and keep up the good work)

torn wind
#

Thanks so much for the kind words! I'll relay them to the team ๐Ÿ’Œ