#jast26

1 messages · Page 1 of 1 (latest)

visual berryBOT
#

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.

  • jast26, 11 minutes ago, 3 messages
  • jast26, 2 days ago, 10 messages
  • jast26, 2 days ago, 12 messages
  • jast26, 3 days ago, 23 messages
uneven ingot
#

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.

muted lichen
#

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?

uneven ingot
#

I think that would be the most sensible way to present the information

muted lichen
#

{
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?

uneven ingot
#

Its not in the payment method

#

it's on the Customer object

#

Sorry I just realized I didn't share the API ref doc

muted lichen
#

thank you!