How to add coupon to an existing subscription in PC2.0?

Modified on: Mon, 3 Apr, 2023 at 3:36 PM

Scope

My customer requested to add a coupon to the subscription

I want to add a coupon during subscription creation

I want to add a coupon to an existing subscription

I want to add a coupon to an existing subscription using API in PC 2.0


Coupons can be added to the subscription in your Chargebee

There are three scenarios where you can add the coupon:

  • When creating a new subscription

    Go to the Subscription Info section in the ‘Create Subscription' page, select a plan using Add Plan and you will find the option to Add Coupon/Coupon Code.  

  • When changing an existing subscription 

     You will find the option on the Change Subscription page as 'Add coupon' 

  • For an existing subscription from the action panel

    Go to the Subscription page and find the Add Coupon option on the Action Panel. This can be added at any point of the billing cycle. 

  • You can add Coupons to an existing subscription using API.  For reference, the API is as follows https://{site}.chargebee.com/api/v2/subscriptions/{subscription_id}/, and you can add the Coupon attributes towards the end of the API as per your need.

    Coupon attributes

    Explanation of attributes

    coupon_id

    Used to uniquely identify the coupon.

     string, max chars=100

    apply_till

    The date till when the coupon can be applied. Applicable for limited_period coupons only.

     optional, timestamp(UTC) in seconds

    applied_count

    The number of times this coupon has been applied for this subscription.

     integer, default=0

    coupon_code

    The coupon code used to redeem the coupon. Will be present only when associated code for a coupon is used.

     optional, string, max chars=50


Also, you can create and share Coupon codes with end-users by creating Coupon sets.

The coupon codes can be uploaded to your Chargebee site using a CSV file.

To upload, go to Product Catalog > Coupon Sets > Click + Upload Coupon sets, select the CSV file, and the main coupon that the coupon set should be linked to.

Note: There is a limit of 1000 coupon codes per coupon set.If you need to upload more, create another CSV file and upload the rest as another coupon set.


Click here to know about the bulk coupon code generator. 


You can also create, apply Coupon code/Coupon sets using the below API.


For Coupon Code API’s

For Coupon Sets API’s

Did you find it helpful? Yes No

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