Coupon
The coupon record that can be applied to a subscription. The Coupon type in Bunny's GraphQL API and its fields.
| Name | Type | Description |
|---|---|---|
| active | Boolean | Is the coupon active |
| couponCode | String | Unique coupon code |
| createdAt | ISO8601DateTime | Datetime the coupon was created |
| currencyId | ID | Currency ID of the coupon |
| description | String | Description of the coupon |
| discountAmount | Float | Amount of the discount |
| discountKind | CouponDiscountKind | Type of discount the coupon applies |
| discountPercentage | Float | Percent of the discount |
| duration | Int | Number of billing periods the coupon applies to. nil means forever. |
| id | ID | Unique ID for the coupon |
| name | String | Name of the coupon |
| planId | ID | Plan ID the coupon applies to |
| redemptionEndDate | ISO8601Date | Date the coupon expires |
| redemptionsCount | Int | Number of times the coupon has been redeemed |
| redemptionsMax | Int | Maximum number of times the coupon can be redeemed |
| remainingPeriods | Int | Number of remaining billing periods available for this coupon for the given account. Returns nil for forever coupons. |
| updatedAt | ISO8601DateTime | Datetime the coupon was last updated |