Docs

Product Catalog Articles & FAQ

checkout pages, coupons, url, code, ChargeBee

41075087

2018-03-12T17:46:16Z

2025-02-12T08:22:05Z

3975

8

8

232315

How can I pass coupon directly to the checkout page, without the users having to enter it manually?

How can I pass coupon directly to the checkout page, without the users having to enter it manually? 

Scope

How to pass coupon id on the checkout URL?

How to create a checkout URL?

Solution

For V2 checkout pages:

If you want to pass a discount code to the checkout page URL, just make use of the following syntax:

For V3 checkout pages:

If you are an Enterprise customer in PC 2.0, there is a new manual discounting feature. Reach out to support@chargebee.com to know more. 

You can include a coupon code in the checkout script so that it is automatically applied. It can be done similarly to the example mentioned in the “Add-on customizations” section in this document. The script code to include coupons is mentioned below.

var cbInstance = Chargebee.getInstance();

var link = document.querySelectorAll(“[data-cb-type=checkout]“)[0];

var product = cbInstance.getProduct(link);

product.addCoupon(“COUPON NAME”);

Also, every plan details page in PC 2.0 has a dynamic payment URL on each price point page, making it incredibly simple for you to share a payment link. Navigate from the Product Catalog > Plans index page > Plan details page > Customer-Facing Info > Get Payment Link. You just have to add the Coupon to the plan and it will create a checkout link with the coupon attached.

[[screenshot assets/images/Billing/bxTIost6kqnDm1OISko0Z8jSpDAWcCEHqw.png]](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/72946684/original/4XjfA0EJz0TflCJ0V0agm2Xt1AkhNc1IvQ.png?1677752921)

Related Articles 

What are coupons sets?
How is coupon validity different from coupon duration?
How to create a Coupon in PC 2.0?
Is it possible to reuse the ID of an archived coupon?
Bulk coupon code generator
Is it possible to limit the coupons only to certain plans via the UI?
How to find out list of coupon code‌s redeemed by the customer?
How to delete a coupon?
Difference between coupons and manual discounts
How to automatically apply coupon only to the first subscription of the customer during sign up?
How to add a coupon for a specific plans? - PC 1.0
How to apply a coupon while reactivating a cancelled subscription?
How to unarchive a coupon that was accidentally archived?
How to add a coupon for a specific currency or items on PC 2.0?
How to clone a coupon in PC 2.0?
Coupon not reflecting in the unbilled charges
How to add coupon to an existing subscription in PC2.0?
What are coupon codes/ coupon sets in PC 2.0?
How to apply coupons on a recurring basis?
How will the coupon code behave?
Applying multiple coupons and manual discounts to a subscription
How to offer coupons to multiple subscriptions of a customer at once?
What is the order type in which coupons are applied?
How to disable 'multiple coupons for a subscription'?
What does it mean when a coupon is marked as 'Exhausted'?
Error - coupon Id is 'already exists' while creating coupon
Why coupon redemption count is more than the coupons actually applied to the Subscription?
Coupon not included in proration calculation
Coupons are not added to the pending Invoice
How my customer used the one-time coupon twice on the same subscription. How to prevent this from happening?
Was this article helpful?
Loading…