# Coupon codes

> For the complete machine-readable documentation index, see [llms.txt](https://apidocs.chargebee.com/llms.txt).


Coupon codes are used along with existing coupons in Chargebee. You can create a coupon set using a bunch of coupon codes and this coupon set will be associated with an existing coupon. A coupon code can only be applied to a single subscription and cannot be re-used.

Using coupon codes you can distribute several unique codes for a single main coupon, when you are running promotions.

## Sample Coupon code

```json
{
  "code": "CBC978B",
  "coupon_id": "alpha",
  "coupon_set_id": "cs_3Rtysnm",
  "coupon_set_name": "Offer",
  "object": "coupon_code",
  "status": "not_redeemed"
}
```

## Coupon codes attributes

## Input Parameters

- `code` (required, string, max chars=50)
  Unique coupon code that can be redeemed only once.

- `status` (required, enumerated string, default=not_redeemed)
  Status of the coupon code.
  Possible enum values:
    - `not_redeemed`
      Can be applied to a subscription.
    - `redeemed`
      Cannot be applied to a subscription as the coupon code has been already used.
    - `archived`
      Cannot be applied to a subscription as it has been made inactive.

- `coupon_id` (required, string, max chars=100)
  Id of the main coupon resource.

- `coupon_set_id` (required, string, max chars=50)
  Uniquely identifies a coupon\_set

- `coupon_set_name` (required, string, max chars=50)
  Coupon set name to which this coupon code would be grouped under. If the coupon set with the passed name is not present, a new coupon set will be created.

