#dai_best-practices
1 messages ยท Page 1 of 1 (latest)
๐ 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/1277615994231062622
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
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.
- dai_schedule-bca, 2 days ago, 14 messages
Both of those are great ideas for how to implement this on our side. Trying to think of any immediate downsides. The main differences that I can think of are that the schedule would be more complicated but would keep the subscription accurate to what you want to provision to the user, the pausing method would be simpler from a Stripe API perspective but would need something on your side to know to provision Pro for a subscription that is paused and on a lower tier price.
Do you have any questions about implementing these or differences between the two?
Thanks for the initial confirmation on the approaches !
I am not sure of the requirements on billing cycle dates yet and how it should interop w/ this trial offer but from what I understand schedules only allows for "resetting" the billing cycle to whenever the original paid Basic plan restarts?
That is a good point, a trial would reset the anchor. I think you can define a $0 price of the same cycle length as your other two and then have your schedule switch to and from that $0 price as a workaround, but I have not had a chance to test that myself yet
Also another thought re: pause collection approach - would this even be necessary since we'd update the subcription with a trial so there's isn't anything we'd suspect to be collected?
the question here to clarify is it even necessary to set pause collection behavior if a trial product is updated
I am not quite sure what you mean by "if a trial product is updated" can you tell me a bit more about that?
With the trial I assumed you meant basically using the pause as the trial. That may make think prorating things weird when it is unpaused now that I think of it, I forget if pausing supports proration. Looking in to that
I am not quite sure what you mean by "if a trial product is updated" can you tell me a bit more about that?
clarifying via code
// ... customer has active subscription with Basic tier product
// Below is provisioning the 14 Pro Trial API
stripe.subscriptions.update('sub-123', {
items: [{ product: 'pro-product', quantity: 1 }],
trial_end: unix-timestamp-14-days-from now // <---- This ensures trial behavior?
});
Or do we need both trial_end and pause_collection?
Also appreciate the assistance btw, I will need to step away from the thread for about an hour or so, I hope this isn't an issue ๐
Gotcha, I think I was assuming that you were trying to avoid changing the subscription cycle. That code could definitely work, it would put the user on a 14 day free trial and then at the end would create a new full cycle at the pro price unless you changed the price back to the original one.