How to add a unit-based charge on the URL?

Modified on: Fri, 26 Aug, 2022 at 6:03 PM

Scope

How to add a unit-based charge on the URL?

I need to add a non-recurring addon on the URL in PC 1.0.

Is there any way to include charges to the URL in PC 2.0?


Summary

By default, you can attach Charges in PC 2.0 and non-recurring Addons in PC 1.0 at the Plan level. Also, you can configure when you want this charge to be added with the subscription. For more information, refer to Applicable Addons and Charges on PC 2.0 and Non-recurring addons on PC 1.0. However, you can only specify the fixed quantity from Chargebee UI as well as you can configure an option to allow your customers to choose the quantity of unit-based charges on Checkout.


Solution

PC 1.0:


Here’s the syntax to include non-recurring addon during signup: 

https://your-domain.chargebee.com/hosted_pages/plans/plan_id?addons[id [0]=addon_id&addons[quantity][0]=number

Sample URL: https://flipbook-test.chargebee.com/hosted_pages/plans/explore1234?addons[id][0]=add-user-1t&addons[quantity][0]=2




PC 2.0:


Here’s the syntax to include Charge during signup

http:/<domainname>.chargebee.com/hosted_pages/checkout?subscription_items[item_price_id][0]=<item_price_id>&subscription_items[item_price_id][1]=<Charge_id>&subscription_items[quantity][1]=number

Sample URL: https://videoclikz-test.chargebee.com/hosted_pages/checkout?subscription_items[item_price_id][0]=Monthly-plan-50-USD-Monthly&subscription_items[item_price_id][1]=Unit-charges-USD&subscription_items[quantity][1]=4


Note: Though the quantity is set by default as per the mentioned parameter on the link, the user will be able to choose the quantity from the drop-down list or manually enter the quantity in the text box highlighted in red.


Related Articles

Checkout URL is not working

How to Generate the hosted page URL?

Why is the checkout page not loading?

How do I integrate Chargebee's modal checkout with my website on WIX?

How to Generate the hosted page URL?

Did you find it helpful? Yes No

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