#jwerre_api

1 messages ยท Page 1 of 1 (latest)

warm violetBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1250188316532281486

๐Ÿ“ Have more to share? Add details, code, screenshots, videos, etc. below.

ripe kelp
#

Hello
It depends on which payment method is being used by the active subscription(s) of the customer.
default_source is for when you use the legacy sources API.

If the subscription has its own default_payment_method parameter set then you'd need to update the subscription... Otherwise, if the subscription uses customer's default payment method under invoice settings.

chrome sequoia
#

So it's best to use: stripe.customers.update(customerId, {invoice_settings: {default_payment_method :'pm_xxx...'}});?

wild mango
#

๐Ÿ‘‹ stepping in for my teammate

#

It depends on the customer experience you want. If you want that default payment method to be used for any invoice (not just the invoices for that particular subscription), updating invoice_settings.default_payment_method makes sense

chrome sequoia
#

okay, yes. That's what I want. One more questions, will this work with Card, Payment Intent, Setup Intent and Payment Method?

wild mango
#

Not sure I understand that question. The value you set there should be a PaymentMethod ID

chrome sequoia
#

e.g.: card_, pi_, seti_, pm_

#

So only pm_?

wild mango
#

Correct, values for invoice_settings.default_payment_method can be PM IDs only

#

PaymentIntents and SetupIntents are used to create PaymentMethod objects but they're like state machines, not payment methods themselves directly