#kevin-r_api

1 messages ยท Page 1 of 1 (latest)

leaden raftBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always 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/1435346283832545391

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

ebon fog
#

Hi there

compact delta
#

HI Bismark. Ship or cit?

#

city

ebon fog
#

Yes that is possible.

#

Ship lol but also just a random psuedonym

compact delta
#

very well. I figured it was generally random, but I could totally see a remote Stripe coder living in ND. (Bundled up)

ebon fog
#

๐Ÿ˜‚

compact delta
#

OK, so I'm going to look for payment_methods, sources ,and invoice_settings.default_payment_method.

ebon fog
#

Anyways, in terms of precedence... this only matters for Subscriptions/Invoices

#

Otherwise you always specify the PaymentMethod or Source via the payment_method parameter of a PaymentIntent.

compact delta
#

OK, that's good to know.

ebon fog
compact delta
#

OK. That part seems easy and I know I've seen that already.

#

but if there's no default_payment_method, source, or invoice_settings.default_payment_method, will the subscription just not charge, or will it look around for a source object on the customer? (or a card object, which I think we have customers old enough to have that attribute.)

#

(some of our code uses an API from 2013, which I'm rewriting, but this is the kind of thing I'm try to rectify before pulling the trigger.)

ebon fog
#

It will not charge if there is no default set

#

You mostly want to make sure that there is a default_payment_method set for every Sub or a default set on every Customer

compact delta
#

OK. so the ONLY customer item that can be involved is invoice_settings.default_payment_method.

ebon fog
#

Ah no actually I forgot about Customer default_source which comes last in the precedence ordering

compact delta
#

OK. and there cannot be a cutomer.default_payment_method, just a customer.invoice_settings.default_payment_method, correct?

ebon fog
#

Correct

compact delta
#

OK. I know I'm overthinking it, but I think that's my job sometimes. ๐Ÿ™‚

#

OK, thanks for the help - have a great day!

ebon fog
#

You too!