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

List coupon codes

List the available coupon codes.

Sample Request

Sample Result[JSON]

URL Format

GET https://[site].chargebee.com/api/v2/coupon_codes

Input Parameters

limit
optional, integer, default=10, min=1, max=100

The number of resources to be returned.

offset
optional, string, max chars=1000

Determines your position in the list for pagination. To ensure that the next page is retrieved correctly, always set offset to the value of next_offset obtained in the previous iteration of the API call.

Filter Params

For operator usages, see the Pagination and Filtering section.
code[<operator>]

optional, string filter

Unique coupon code that can be redeemed only once. Supported operators : is, is_not, starts_with, in, not_in

Example → code[is_not] = "OFF2009"

Supported operators: is, is_not, starts_with, in, not_in
Example OFF2009
coupon_id[<operator>]

optional, string filter

Id of the main coupon resource. Supported operators : is, is_not, starts_with, in, not_in

Example → coupon_id[is] = "OFF20"

Supported operators: is, is_not, starts_with, in, not_in
Example OFF20
coupon_set_name[<operator>]

optional, string filter

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. Supported operators : is, is_not, starts_with

Example → coupon_set_name[is_not] = "OFF20"

Supported operators: is, is_not, starts_with
Example OFF20
status[<operator>]

optional, enumerated string filter

Status of the coupon code. Possible values are : not_redeemed, redeemed, archived.

Supported operators : is, is_not, in, not_in

Example → status[is] = "redeemed"

Supported operators: is, is_not, in, not_in
Example redeemed

Returns

next_offset
optional, string, max chars=1000

This attribute is returned only if more resources are present. To fetch the next set of resources use this value for the input parameter offset.

Coupon code object
Resource object representing coupon_code