Need to extend trial days when the customers add their payment methods during trial period.

Modified on: Mon, 14 Aug, 2023 at 10:31 PM

This article covers 

I need to extend the number of trial days from 7 to 30 days if the customers have subscriptions in the trial, will add the payment method. How to achieve that in Chargebee in an automated way?


Summary 


If you need to extend the trial period of the subscription when your customer adds their payment method, you can do that in two ways - 

  • Manual: You can extend the Trial period by clicking on the “Edit trial end date” on that particular subscription details page 
  • Automate: You can use the API call to update the subscription to specify the trial end date with the combined use of Webhook calls.


Solution 

  • Manually - You need to monitor when the customer will add the payment method, after adding the payment method you can use the “Edit Trial End Date” action to extend the trial days. This option is available on the right-hand side of the action panel of the subscription details page.




  1. Automatically - When a payment method gets added via Hosted pages or via API call by the customer, it will generate the event 'Payment Source Added'. You need to set up a webhook call to listen to this particular event by navigating to Settings >> Configure Chargebee >> Webhooks. You can read about Webhook configuration in the following links-  For PC 1.0For PC 2.0. As soon as the 'Payment source added' event takes place, the configured webhook will send the information of the event to your system. You can set up an API call to update the subscription upon receiving this webhook notification. In the API call, you need to pass the value of the parameter “trial_end” in the UTC Epoch timestamp. The required API call is mentioned in the links here, For PC 1.0For PC  2.0.


Related articles and Documentation

Can I change the trial end date for an existing trial subscription?

Is there any option to add a trial period for a subscription/plan?

Effect of “Edit trial end date” on Billing Cycles of a subscription


Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.
×