#valahaar_api
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/1377977159490211852
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
hi there!
the simplest solution is to add a free trial to the subscription until when you want the subscription to renew. this is explained here: https://docs.stripe.com/billing/subscriptions/billing-cycle#changing
oh I see! I tried adding 40 free trial days but with then I advanced time with the test clock and the customer was billed again once the trial was over
but it kind of messes with the UI (we show different things based on whether you have an active trial or a "standard" sub)
is there an alternative?
reading through that doc page I see I can set the billing cycle anchor to "now"
if I were to do this in 30 days, would it bill the user somehow? or does setting proration_behavior=none in the request prevent the new invoice / billing?
I (we show different things based on whether you have an active trial or a "standard" sub)
You could use metadata to know if it's a "real trial" or not
is there an alternative?
not really
You could use metadata to know if it's a "real trial" or not
I mean sure, a workaround is easy to find. was just wondering if it was possible to do in a "legit" way somehow, didn't seem like an edge case tbh ๐
๐ taking over for my colleague. Let me know if there's any follow-up Qs I can answer!
pretty much only this one ๐
if I were to do this in 30 days, would it bill the user somehow?
by passingproration_behavior: 'always'
or does setting proration_behavior=none in the request prevent the new invoice / billing?
correct
so to achieve this without free trial days I can set myself a reminder to run this command in 30 days, right?
curl https://api.stripe.com/v1/subscriptions/sub_XXXXXX \
-u sk_test_...: \
-X POST \
-d "proration_behavior=none" \
-d "billing_cycle_anchor=now" \
-d "cancel_at_period_end=false"
and it should work if I were to test this with clocks as well right?
so to achieve this without free trial days I can set myself a reminder to run this command in 30 days, right?
you can use subscription schedules actually
and it should work if I were to test this with clocks as well right?
yes
how exactly? (sorry I'm not very familiar with them)