#MikeGreat
1 messages ยท Page 1 of 1 (latest)
Hi
Nope you can't using Subscriptions, you should use Subscription Schedule to plan future updates
can you explain better
You can upgrade the user to a new plan with a future start date, by configuring a subscription schedule phase
this is my use case, I start a plan A as trialing and when the user decides to upgrade to plan B I calculate the proprated amount of Plan A and deduct from Plan B . then call the subscription upgrade api.
the charge is done via invoice
the problem is that propration doesnt work on a trialing when the user upgrades
@night vigil
Trialing is a free usage of the subscription, what do you mean by doing proration on trialing ?
for out business use case, we want to be able to charge the user during an upgrade while on a trialing plan
but this isnt working as expected because the upgrade prorates over 0 amount
@night vigil
hello @night vigil
HI there ๐ I'm jumping in as my teammate needs to step away.
Can you elaborate on what you mean by this?
ok, so a user on trial plan A wants to upgrade to a plan B. Currently, when the user upgrades, the new plan still remains at trialing and so no money is collected
i want to be able to charge the user using proration even on a trialing plan
Am I understanding correctly that when you update the Subscription you don't want it to remain in a trialing state?
Okay, so in your update request, are you setting trial_end to now to indicate that the trial should end as part of the update and the Subscription should move to the next billing period?
https://stripe.com/docs/api/subscriptions/update#update_subscription-trial_end
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
yes, but the invoice generated isnt prorated
the trialing issue is fixed when i set it to end now but the invoice generated isnt a prorated amount
What are you passing for proration_behavior when you're updating the Subscription?
always
Can you share the ID of a Subscription that you were testing with when you saw this behavior?
ok i will generate a new one
also @silver void will the upgrade prorate correctly ? since the amount unused on a trialing plan is 0.
Wait, that's a good point, if you're coming from a trial then what is there to prorate if the customer hasn't already paid?
yes, but we have a use case where we collect that amount as part of another product and give them a trial plan
so in the sense , the user already paid for the plan
But our service doesn't know that's what you're doing, and we don't have prebuilt functionality to support something like that. So if that is behavior that you will want then you will need to build custom code to explicitly control what is being charged for prorations.
i have done a manual proration using the invoice api. the issue i face is how do i set a new billing cycle on a subscription . this billing cycle should charge the customer after a year. since i already created an invoice
@silver void
I'm sorry, I don't think I understand what you're trying to say. The length of a billing cycle for a Subscription is controlled by the Price objects within it. Is that what you're referring to, or are you referring to the billing_cycle_anchor?
can i modify a subscription start date?
Not once it has started.
The only control over start date is the backdate_start_date parameter available when creating a Subscription:
https://stripe.com/docs/api/subscriptions/create#create_subscription-backdate_start_date
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.