#changpet_code
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/1231993512480739449
đ 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.
- changpet_code, 4 minutes ago, 4 messages
The solution offered by a dev was to just set the subscription on trial until the next billing cycle. In the past, when we remade subscriptions through the dashboard, there was the option to set the billing a month ahead. Is there the ability to do this thru the API?
Hello
Hi, seems like you helped me last time, sorry for not responding promptly. First time doing this so didnt know it would close
Yes you can do this via the API by using trial_end: https://docs.stripe.com/api/subscriptions/create#create_subscription-trial_end
All good
Threads do close after a period of inactivity
I believe this is possible via the Dashboard too
Let me check on that -- we aren't experts in the Dashboard, we really just focus on the API
We wanted to automate it instead of continuing to manually do this through the dashboard moving forward. Seems like we could do the trial_end, but could I get more explanation on the billing_cycle_anchor? does that not achieve what I'm trying to do with the subscription?
Setting the billing_cycle_anchor is still going to generate an initial charge
You would use this to charge a prorated amount for a partial initial period
Which is not what you want here
I originally tested this on test mode to simulate a failed invoice, and using these parameters seemed to work with the billing_cycle_anchor. Like it made the subscription on stripe correctly. But on live mode, when a real customer did this, it threw the error mentioned in the original post
I also set the proration_behavior: 'none', would this not remove the prorated amount for the initial period?
No that would charge the full amount
If you want to share examples where this worked in test mode but not in live mode then I can look at those specifics
But the right way to do this is with a trial period
okay, taking a quick look at things, can this be left open for a few minutes?
Sure
I think I'll test out the trial_end, but it might mess with our configuration since we utilize trial subscriptions for some of our customers as well. Is there no other solution without having to use trial_end?
The only other solution would be to use a Subscription Schedule
To start the Subsciption in the future
Okay, I think I'll test out the trial_end. One more question though, what exactly is the purpose of the billing_cycle_anchor if it's not for what I'm trying to do?
It is the reference point for when subscriptions cycle, we have a good doc on it here https://docs.stripe.com/billing/subscriptions/billing-cycle
Going to test so will take a few minutes, is it possible to leave this ticket open so if I run into any issues along the way I can ask again here? Or does it need to be closed