#kphan
1 messages · Page 1 of 1 (latest)
HI sorry for the wait. Looking now
I don't think you can. You would need to either create a free trial to make up for the unused time between now and when the Subscription starts, or use a Subscription Schedule to create a Phase for the time between now and when it starts
For the Subscription Schedule, how would I go on about that route? I've created a Schedule like so
schedule = stripe.SubscriptionSchedule.create(
customer=customer.id,
start_date = start_subscription,
phases=[
{
"items": items,
},
],
)
how can I attach it to the subscription?
For an existing Subscription you would use the from_subscription property: https://stripe.com/docs/api/subscription_schedules/create#create_subscription_schedule-from_subscription
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
so will this technically change the Subscription current_period_start to the start_date in the attached Subscription Schedule?
Hmmm, I believe so, but let me check
Oh, it wont allow me to set a start_date in the Schedule if I'm using from_subscription
So no, it looks like from_subscription has to be set on its own, then you add things like phases and start_date.
Let's take a step back here though, as I'm not convinced that Subscription Schedules is the best solution. You mentioned in the beginning that you wanted to update a Subscription to have a future start date. What are you hoping that will do? In other words, what are you actually trying to do by changing current_period_start?
I need to change the subscription start date to a future date
But the Subscription has already started in this case, yes? In other words, it's an active subscription with a billing_cycle_anchor on it already?
yeah
And what are you hoping that modifying current_period_start will do?
There's no way to modify this, as there isn't an option for updating a Subscription in that way: https://stripe.com/docs/api/subscriptions/update so I'm hoping to lead you to an actionable solution, but I need to know what the desired outcome is
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
I just want to start subscriptions at a future date when creating them
Okay, so that's entirely different from updating active Subscriptions
If you want to create a Subscription that starts on a future date, you would just set the billing_cycle_anchor to some future date when you create the Subscription: https://stripe.com/docs/api/subscriptions/create#create_subscription-billing_cycle_anchor
Alright, I am new to this so your advice is appreciated
oh, how can I verify this in the dashboard?
All good! These things are complicated. There's a learning curve, so I'm happy to assist.
oh, how can I verify this in the dashboard?
You create the Subscription and then find it in the Dashboard. There it will show you what thebilling_cycle_anchoris set to
hmmm so here's the Invoice transaction id in_1MRkxuAO2E0YXg21HMqbc8Tk I can't find the billing_cycle_anchor prop in the transaction details and also the amount charged seems off
You need to look at the Subscription itself. You can look for the Subscription's created Event to get the Subscription object details in the Dashboard, or you can retrieve the Subscription object from the API: https://stripe.com/docs/api/subscriptions/retrieve