#emrys_subscription-defaultpm

1 messages ยท Page 1 of 1 (latest)

cosmic treeBOT
#

๐Ÿ‘‹ 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/1286356114216194099

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

rigid vine
#

emrys_subscription-defaultpm

#

@hot root you missed something important. It's not your fault, everyone misses it, and if you ask me it should have been the default behaviour years ago ๐Ÿ˜…

But basically when you create the Subscription you need to configure it so that the PaymentMethod you collect for the first Invoice is then automatically marked as the default PaymentMethod for future payments on that Subscription. You want this parameter: https://docs.stripe.com/api/subscriptions/create#create_subscription-payment_settings-save_default_payment_method

Alternatively, after the payment is done, you can call the Update Customer API https://docs.stripe.com/api/customers/update in your own code and set the PaymentMethod pm_1234 as the default globally on the Customer for all future Invoices and Subscriptions by setting the invoice_settings[default_payment_method] parameter: https://docs.stripe.com/api/customers/update#update_customer-invoice_settings-default_payment_method

hot root
#

thanks for the quick response!

#

so payment_settings.save_default_payment_method = 'on_subscription'

#

that makes perfect sense!! thanks

rigid vine
#

sure thing!

hot root
#

worked perfectly! thanks

#

how did i miss that - so clear in the docs! ๐Ÿ™‡โ€โ™‚๏ธ