Let’s get you some solutions. Access our on-demand resources, participate in the Chargebee customer forum, or raise a ticket to talk to our team.
Our hosted payment page is a simple URL available at the "Plan" level. Using this you can quickly link any website to accept payments via Chargebee.
Now this got more awesome with some advanced features.
You can now make a bundled offering including addons and discounts without any API calls, just by including these details in the plan specific hosted page URL.
Here is how you can set it up:
Look for "Hosted page URL" at the bottom of your plan details page.
All plan URLs will look something similar to this: https://yoursitename.chargebee.com/hosted_pages/plans/plan_id
1. Specifying plan quantity:
If you have a single plan but with different quantities, you can specify the plan quantity in the URL and Chargebee will calculate the cost and display the total charge on the hosted page.
Sample URL: https://yoursitename.chargebee.com/hosted_pages/plans/<plan-id>?subscription[plan_quantity]=2
2. Apply a default coupon discount during sign up:
When you would like to offer a discount to certain coupons without allowing users to key in a coupon code themselves, you can create a URL using the coupon code yourself.
Sample URL: https://yoursitename.chargebee.com/hosted_pages/plans/<plan-id>?subscription[coupon]=<coupon-id>
Apply a setup fee and postpone the initial payment to the second billing cycle:
For certain business models, merchants may want to charge their customers just the setup/installation fee during sign up and charge them on the second month. To get this done, create a plan along with its setup fee, and a coupon with the plan cost as the discount amount. Specify this coupon in the URL. When the customer signs up, their first month's plan cost will be waived off and they will only be charged for the setup fee.
This is also displayed to them on the hosted page.
3. Include an addon during sign up:
If you are selling a particular product and as an addon you want to allow customers to purchase an additional product/service, you can include this as an addon in the plan URL.
4. Include an addon with quantity during sign up:
For quantity based addons you would specify the addon as well as the quantity amount in the URL.
Sample URL: https://yoursitename.chargebee.com/hosted_pages/plans/<plans-id>?addons[id]=<addon-id>&addons[quantity]=2
5. A Plan URL with all of the above:
Here's a sample URL for creating a subscription that includes subscription ID, plan quantity, addon with quantity and coupon.
Sample URL: https://yoursitename.chargebee.com/hosted_pages/plans/<plan-id>?subscription[id]=<unique-id>&subscription[plan_quantity]=2&addons[id]=<addon-id>&addons[quantity]=2&subscription[coupon]=coupon-id
Placeholders used in the URL
subscription[id]=<unique-id> - This is the placeholder that you would use if you want to specify a subscription ID. If you are going to explicitly specify a subscription ID please make sure it is unique. This placeholder is NOT mandatory.
subscription[plan_quantity]= - You can specify the plan quantity after "=".
addons[id]=<addon-id> -  specifies the number of the addon. So if you are going to include 2 addons to the subscription, then the URL will look something like:
The <addon-id> is where you would enter the ID of the addon. You can find the ID by clicking on an existing addon.
addons[quantity]= - Used to indicate the quantity of the addon to be included in the subscription. Specify the quantity after "=".
subscription[coupon]= - Used to specify the coupon that needs to be applied to the subscription. Specify the coupon ID after "=".
subscription[trial_end]= - Used to override the default trial period. Specify the time in the Unix Timestamp format in UTC.
Use "?" at the end of the plan ID and "&" for each placeholder. "&" is not required after the "?" that is used after the plan ID.
<> - Do not include this when specifying your values like plan id or addon id.
A limitation for quantity based plans or addons when using this method is that your customers will not be able to choose or edit the quantity on the hosted page. As a workaround you can create a quantity drop down on the plan page of your website, and based on the input your customers enter, generate the URL along with the value specified.
Drop us a comment if you have a question or would like to add something.
Bee. I can do it easily after your reputed guide.