#beneordio_best-practices

1 messages ยท Page 1 of 1 (latest)

radiant scarabBOT
#

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

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

crisp light
#

๐Ÿ‘‹ happy to help

mortal horizon
#

Hey, thanks for helping out! The subscription object start date would then be the trial start, is that correct?

How would the calculation account for multiple trial periods e.g., 7 days trial -> subscription ends and there is no subscription for, say 2 weeks -> another custom trial period of 3 days -> after the 3 days start of a regular subscription

crisp light
#

I'm not sure I understand

mortal horizon
#

A customer might have multiple different trials
First trial 7 days. Then no subscription for a month. Afterwards another 3 days of trial.

Total trial days for that customer would therefore be 10 days.

Is there a way we can get that information from stripe?

crisp light
#

you would have to list all subscriptions for a customer

#

and then for each you would calculate based on the difference between trial_end and start_date

mortal horizon
#

Okay and that would consider multiple different trial durations and add them all up?

crisp light
#

if they are on different subscriptions then yes

mortal horizon
crisp light
crisp light
#

with your own columns

mortal horizon
#

Okay, so how and where would i need to make the calculation and where do i retrieve the data points?

#

Sorry - but I will be afk for an hour and wont response because i need to go somewhere but will be back afterwards. Thanks for your help so far!! Appreciate it a lot.