#rob_customer-defaultpm

1 messages ยท Page 1 of 1 (latest)

pulsar ridgeBOT
#

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

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

spark crystal
unique token
unique token
# spark crystal <https://docs.stripe.com/payments/checkout/subscriptions/update-payment-details#...

Ok so looking at that snippet that is what I am doing after the first invoice.payment_succeeded with billing_reason = subscription_create. So I guess what I am asking is there a way to create a new PaymentMethod via the PaymentElement and then associate it with the Customer? And then on the server -- maybe listening to the payment_method.attached webhook -- then use API to set the default payment method like in the snippet example you just provided?

spark crystal
pulsar ridgeBOT
unique token
empty spear
#

๐Ÿ‘‹ Taking over this thread, catching up now

#

Yup! You will create a Setup Intent with usage as off_session to collect new payment method, then set the newly collected payment method as default to the subscription

unique token