#evan_best-practices
1 messages ¡ Page 1 of 1 (latest)
đ 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/1247244720938291224
đ Have more to share? Add details, code, screenshots, videos, etc. below.
You have to explicitly set it in some most cases. The default can either be set on the Customer object or the Subscription object
understood, is the best way to listen for payment_method.attached events, assume the latest updated method is the default, and attach to the customer/subscription?
That's a way to do it yes. Often times folks will have a radio button for the customer to toggle that says something like "Set this payment method as default on all subscriptions and invoices"
would that be with a custom field in the checkout session or something?
No. That would be somewhere in the form where you present the Customer with all their saved paymetn methods. If you're just using checkout sessions and nothing else, then you may as well just set the pm as default as soon as it's created, like you said