#jast26
1 messages · Page 1 of 1 (latest)
Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
HI 👋
I"m not sure I understand what you are referring to about the "preferred" payment method but you can set the default PM by updating the invoice_settings.default_payment_method to the ID of a Payment Method attached to the Customer.
ok, but how can i do it when listing it? i have a screen where i am listing all the paymetn method the user has saved, should i call two endpoints? first list on customer and then save new default on invoice?
I think that would be the most sensible way to present the information
{
id: 'pm_1O8PJIFVOCe6l2jaPn65J8gE',
object: 'payment_method',
billing_details: { address: [Object], email: null, name: 'Jane Doe', phone: null },
card: {
brand: 'mastercard',
checks: [Object],
country: 'US',
exp_month: 12,
exp_year: 2028,
fingerprint: 'ZJK8oNCzL9dC6nYI',
funding: 'credit',
generated_from: null,
last4: '4444',
networks: [Object],
three_d_secure_usage: [Object],
wallet: null
},
created: 1699025364,
customer: 'cus_OvTeDKQoAOSYll',
livemode: false,
metadata: {},
type: 'card'
},
this is a sample response i get when listing payment methods on customer, am i supposed to expand something to see the invoice_settings?
Its not in the payment method
it's on the Customer object
Sorry I just realized I didn't share the API ref doc
Here is the property I"m talking about : https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method
thank you!