#MikeGreat

1 messages · Page 1 of 1 (latest)

mellow emberBOT
cerulean rain
turbid mesa
#

I used the upgrade api but because the user is already on a trial plan it upgrade the plan but its still on tria;

cerulean rain
#

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)

rough kernel
#

@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

turbid mesa
#

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

rough kernel
#

I think you should create a plan/price with 0$ amount rather than using trials then

turbid mesa
#

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

silver laurel
#

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?

turbid mesa
#

i want to stop the trial without charging the user and update the user to a new paid plan and charge immediately

silver laurel
#

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

turbid mesa
#

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

silver laurel
#

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

turbid mesa
#

ok

#

that means i can pass the trial_end into this stripe.Subscription.modify()?

silver laurel
#

yep!

turbid mesa
#

oh nice thanks

silver laurel