#robert-subscription-upgrade
1 messages ยท Page 1 of 1 (latest)
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.
Hey Robert, let me look into this for you!
Hello, It would be appreciated, thank you!
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.
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
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.
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?
How do you expect users to provide the card details once the free trial ends?
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
Gotcha, what seems to be the problem after you switch to a different price?
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
- Stop the free trial (cancel it)
- Bill the customer immedietly
- Change the plan to paid one without the trial
When you perform step 1, do your customers not get billed immediately?
So
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.
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
so you just want to end the trial immediately as you switch to a new Price right?
yep
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
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
Okay, I think I may have misunderstood. Do you just want to know how to end the free trial immediately?
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
Can you try setting trial_end=now and then revert your change to proration_behavior=none?
so I set back proration_behaviour always invoice?
Yup!
ok just a sec
You don't really need proration_behavior also, it always invoices when you do free/trial -> paid
Oh it worked ๐
yeah I saw that
so I was missing trial_end=now
Nice! Thank you very much for the help!!!
np! Glad it's working ๐
Thanks again! Have a nice day / night!