#mymodian_best-practices
1 messages ¡ Page 1 of 1 (latest)
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- mymodian_unexpected, 22 hours ago, 11 messages
- mymodian_docs, 1 day ago, 17 messages
đ 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/1256208169965846579
đ Have more to share? Add details, code, screenshots, videos, etc. below.
Yes the schedule obviously automates the creation of the subscription to the desired date, so there's an assumption there that you've provided the payment details ahead of time. So you'll need to collect them via a Setup Intent, and then use the generated pm_xxx with the schedule
so there's only one way to achieve this, that is: create a setup checkout session to collect the customer's payment method, then pass it to param SubscriptionScheduleDefaultSettingsParams.DefaultPaymentMethod when create the subscription schedule. Is this correct?
Well you don't need to use Checkout if you're not already: https://docs.stripe.com/payments/save-and-reuse?platform=web&ui=elements
But yes, or alternatively you bring them back on-session when the schedule starts and collect payment details then
OK, thanks.
By the way, when i create a subscription with trial period, i found that stripe will not collect the payment method too. So i need to do it like this too?
i found that stripe will not collect the payment method too
What do you mean by that?
when i create a subscription, set TrialPeriodDays to 2, it will not generate a LatestInvoice to the subscription.
So i need to do it like this too?
Entirely up to you! You can allow 'free' trials without collecting a PM and control the behaviour once the trial end: https://docs.stripe.com/billing/subscriptions/trials#create-free-trials-without-payment
There will be a latest_invoice, there just won't be a Payment Intent on that invoice. Instead there'll be a pending_setup_intent to use to collect payment details if you wish
let me have a check
can you tell me the field name which contains the pending_setup_intent? i didn't find it in the object Invoice
It's top-level on the Subscription object: https://docs.stripe.com/api/subscriptions/object#subscription_object-pending_setup_intent
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Oops, fixed the link
oh yes, i found it
it worked.