#MikeGreat
1 messages · Page 1 of 1 (latest)
hi! https://stripe.com/docs/billing/subscriptions/upgrade-downgrade#changing is how you change a Subscription from one Price/Plan to a different one.
I used the upgrade api but because the user is already on a trial plan it upgrade the plan but its still on tria;
not sure what you mean by a "trial plan", might help to look at the specific sub_xxx
if you mean the subscription is currently trialing, (it has status:trialing) then you also need to update trial_end to stop that(for example you can do trial_end:"now" to end the trial and force payment of a new billing cycle)
@turbid mesa I just reopend your thread,
i cant reply the thread anymore. A user is currently on a trial subscription on plan A . how can i upgrade the user to a paid plan B subscription and stop the Plan A trial? . I need help please
As my colleague mentioned above:
if you mean the subscription is currently trialing, (it has status:trialing) then you also need to update trial_end to stop that(for example you can do trial_end:"now" to end the trial and force payment of a new billing cycle)
https://stripe.com/docs/api/subscriptions/update#update_subscription-trial_end:~:text=The special value now can be provided to end the customer’s trial immediately
i dont want to force payment of a new billing cycle, i want to end the trial and upgrade to a new sunbscription plan
also , once i end a trial, i dont want trial end to force a new billing cycle I want only want a payment on a new plan
I think you should create a plan/price with 0$ amount rather than using trials then
ok, so we give users trial subscription for a period. lets say 30 days. on day 15 user wants to upgrade to a new plan . Currently the ugrade process doesnt work as expected . Its upgrading the user but on a trial plan. we want to bill the user even if he was on a trial plan
i dont want trial end to force a new billing cycle I want only want a payment on a new plan
the end of a trial will necessarily kick off a new billing cycle for the non-trial price
You want to have the underlying price replaced, but leave the trial as is until it naturally ends?
At which point the billing cycle should start for the "upgraded" price they picked?
Is that right?
i want to stop the trial without charging the user and update the user to a new paid plan and charge immediately
Ok, you can do that, but that is what we mean by starting a new billing cycle, that's what you've described
You can do this by updating the subscription to set the new Price you want to use in the items and ending the trial immediately with trial_end=now
what api do i use for this
upgrade_result = stripe.Subscription.modify(
subscription.id,
cancel_at_period_end=False,
proration_behavior='always_invoice',
items=[{
'id': subscription['items']['data'][0].id,
'price': price_id,
}]
)
this is the upgrade logic i use to change a user
does this mean i have to end the trial before doing this upgrade logic
you can do it in the same request with trial_end=now
You don't have to end the trial, you said that you want to though
yep!
oh nice thanks
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.