#robert-subscription-upgrade

1 messages ยท Page 1 of 1 (latest)

inland brook
#

Hello!

loud tiger
#

Hello!

#

I am aware that I am able to cancel the free trial one and create a new subscription. But was trying to find a way to update existing one.

#

The free trial subscription does not collect credit card data.

waxen valley
#

Hey Robert, let me look into this for you!

loud tiger
#

Hello, It would be appreciated, thank you!

waxen valley
#

Have you tried ending a free trial? It should invoice your customer after it ends.

#

When the trial ends, we generate an invoice and send an invoice.created event notification. Approximately 1 hour later, we attempt to charge that invoice. A new billing cycle also begins for the customer when the trial ends.

loud tiger
#

Well

#

The thing is

#

As I said above

#

Credit card data is not collected

#

When the free trial is made

#

So I don't know if collection can be made

waxen valley
#

Yup, that makes sense. When you make an API call to end the free trial immediately, we should send an invoice to the customer which will collect the credit card information.

loud tiger
#

So my goal is

#

to not collect anything for the free trial

#

when the customer decides to upgrade on the trial period

#

I just end his trial

#

and update the subscription with the new price

#

bill the customer immediately

#

and from that moment on

#

he is on the paid plan

#

makes sense?

#

Is there any way that I can achieve this?

waxen valley
#

How do you expect users to provide the card details once the free trial ends?

loud tiger
#

well

#

"when the customer decides to upgrade on the trial period"

#

so when the free trial is still not ended

#

Currently I take the customer through

#

the checkout flow

#

I get the payment details

#

and as a last option

#

Instead of create

#

I update the subscription with the free trial

#

to a different price

waxen valley
#

Gotcha, what seems to be the problem after you switch to a different price?

loud tiger
#

Well

#

That code above works well

#

the only problem with it is

#

that the invoice seems to occur only on trial end

#

meaning the payment is expected then

#

what I want is

#
  1. Stop the free trial (cancel it)
#
  1. Bill the customer immedietly
#
  1. Change the plan to paid one without the trial
waxen valley
#

When you perform step 1, do your customers not get billed immediately?

loud tiger
#

So

waxen valley
#

There's an optional collection_method attribute you can pass along to send an invoice once the trial ends. Or you can charge immediately with the stored payment method which has been collected on-session.

loud tiger
#

Yes I understand the fact that

#

the free trial has an associated price

#

but I want to use the free trial only for the free period

#

I dont want to bill the customer at the end

#

for example:

#

we have two fixed plans

#

one monthly and one yearly

#

this is not selected by the customer when he chooses the free trial

#

so the invoice or billing will not be ok for the trial period

inland brook
#

so you just want to end the trial immediately as you switch to a new Price right?

loud tiger
#

yep

waxen valley
#

So I think you just need to change the proration_behavior which will end the trial immediately after you switch to a new price.

#

Just set the attribute value to none

loud tiger
#

Oh none

#

ok, I was setting it to always_invoice

#

ok will have a go

#

just a sec

#

sub_1LIbOOIAxCT2YDDaDQMtbdnJ

#

so I tried with none

#

but it doesn't seem to charge the card

waxen valley
#

Okay, I think I may have misunderstood. Do you just want to know how to end the free trial immediately?

loud tiger
#

Yes sort of to end it but somehow continue on the same subscription

#

and charge the user on the price i set

#

not the one that is initially set on the free trial type subscription

waxen valley
#

Can you try setting trial_end=now and then revert your change to proration_behavior=none?

loud tiger
#

so I set back proration_behaviour always invoice?

waxen valley
#

Yup!

loud tiger
#

ok just a sec

inland brook
#

You don't really need proration_behavior also, it always invoices when you do free/trial -> paid

loud tiger
#

Oh it worked ๐Ÿ˜„

#

yeah I saw that

#

so I was missing trial_end=now

#

Nice! Thank you very much for the help!!!

waxen valley
#

np! Glad it's working ๐Ÿ™‚

loud tiger
#

Thanks again! Have a nice day / night!