v49

latestOpenAPI 3.1.0raw.githubusercontent.com2026-07-081445491.8 MB
Coupon

Archive coupon

This endpoint allows a coupon to be archived. Archived coupons can no longer be redeemed, and will be hidden from lists of active coupons. Additionally, once a coupon is archived, its redemption code can be reused for a different coupon.

post/coupons/{coupon_id}/archive

Path parameters

coupon_idstring required

Response

OK

idstring required

Also referred to as coupon_id in this documentation.

redemption_codestring required

This string can be used to redeem this coupon for a given subscription.

times_redeemedinteger required

The number of times this coupon has been redeemed.

duration_in_monthsinteger nullable required

This allows for a coupon's discount to apply for a limited time (determined in months); a null value here means "unlimited time".

max_redemptionsinteger nullable required

The maximum number of redemptions allowed for this coupon before it is exhausted; null here means "unlimited".

archived_atstring date-time nullable required

An archived coupon can no longer be redeemed. Active coupons will have a value of null for archived_at; this field will be non-null for archived coupons.

Example response

{
  "id": "7iz2yanVjQoBZhyH",
  "redemption_code": "HALFOFF",
  "discount": {
    "applies_to_price_ids": [
      "h74gfhdjvn7ujokd",
      "7hfgtgjnbvc3ujkl"
    ],
    "percentage_discount": 0.15
  },
  "duration_in_months": 12
}