Introducing the Better Auth Chargebee plugin: Use it to handle subscriptions, billing, and auth seamlessly.
Chargebeechargebee API

Copy a coupon

Idempotency Supported

Copies a coupon over from one site to another. Copying of archived coupons is not supported.

The item prices that are linked to the coupon in the source site are also linked to the coupon in the destination site. However, this will only work if those item prices exist and with the same ids, in the destination site. Hence, it is recommended that the item prices be copied over before copying the coupons.

The value for redemptions is not copied. It is set to 0 for the newly created coupon. Hence, if such a coupon had expired in the source site due to redemptions having reached max_redemptions, it's status would be active in the destination site.

Sample Request

Sample Result[JSON]

URL Format

POST https://[site].chargebee.com/api/v2/coupons/copy

Input Parameters

from_site
required, string, max chars=50

Your Chargebee site name having the coupon to be copied. Note: Unless you are copying from a twin site (acme & acme-test are twin sites), contact support to have this allow-listed.

id_at_from_site
required, string, max chars=100

Id of the coupon to be copied. The new coupon created in this site will have the same Id.

id
optional, string, max chars=100

Id of copied coupon in this site.

for_site_merging
optional, boolean, default=false

If copy action is performed as part of Chargebee site merge action, pass the value as true. Note: If this parameter is passed true coupon state, redmeptions, coupon set and coupon codes associated with this coupon will be copied.

Returns

Coupon object
Resource object representing coupon