Start a new topic
Answered

Adding more units to a plan

Hi,


I'm trying to implement a unit plan, where users can buy 100 credits for $X and they either don't expire or expire in a year.


If the user runs out of credits, what's the best way to topup? Do we cancel the subscription through the API and let the user create a new one via HPP? Or is there a better way to add units to an existing subscription and just get charged for the difference?


My main concern is that the user will get frustrated entering their details on the HPP each time, so I'd prefer a simple way to add units to an existing subscription.


I was also wondering if there's a way to get a link to an HPP for an existing subscription that expired or was cancelled, so the user can reactivate an existing subscription instead of creating a new one?


Thanks,

Vaughn


Best Answer

Hi Vaughn,


For this particular workflow, you can create $0 base plans in Chargebee, and use addons in place of credits.  


You can set these up as $0 plans in Chargebee, and the different credit slabs as quantity based non recurring addons in Chargebee. 


In your website, you can show them a dropdown containing the addons, so that the customer could select the credit pack they want to purchase. Post selection, you can pass the selected addon along with the plan specific hosted page URL


Once they've subscribed to a particular pack of credits, you can get this quantity via Payment Succeeded webhook, and track the credit balance on your end. 


When their credit balance is running low, you can show them a popup within your application asking if they'd like to replenish their credit balance. 


If they select Yes, you can show them the addon list again and use the Create Invoice for Addon API to include the addon they selected and charge them immediately.


If they select No, you can call the Cancel Subscription API with end_of_term parameter as true to schedule the subscription for cancellation at term end. 


This way, they won't have to go to the HPP every time. After the first time, you would simply be using APIs to add units to their subscription. Please let me know if this works for you. 


Answer

Hi Vaughn,


For this particular workflow, you can create $0 base plans in Chargebee, and use addons in place of credits.  


You can set these up as $0 plans in Chargebee, and the different credit slabs as quantity based non recurring addons in Chargebee. 


In your website, you can show them a dropdown containing the addons, so that the customer could select the credit pack they want to purchase. Post selection, you can pass the selected addon along with the plan specific hosted page URL


Once they've subscribed to a particular pack of credits, you can get this quantity via Payment Succeeded webhook, and track the credit balance on your end. 


When their credit balance is running low, you can show them a popup within your application asking if they'd like to replenish their credit balance. 


If they select Yes, you can show them the addon list again and use the Create Invoice for Addon API to include the addon they selected and charge them immediately.


If they select No, you can call the Cancel Subscription API with end_of_term parameter as true to schedule the subscription for cancellation at term end. 


This way, they won't have to go to the HPP every time. After the first time, you would simply be using APIs to add units to their subscription. Please let me know if this works for you. 


1 person likes this

Thanks! We'll use this method.

Login or Signup to post a comment