Skip to main content

Create coupon

This endpoint allows the creation of coupons, which can then be redeemed at subscription creation or plan change.

Request Body required
    redemption_code string required

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

    discount object required
    oneOf

    object

    duration_in_months integer nullable

    Possible values: >= 1 and <= 120

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

    max_redemptions integer nullable

    Possible values: >= 1 and <= 1000000000

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

Responses

Created

Response Headers

    Schema
      id string required

      Also referred to as coupon_id in this documentation.

      redemption_code string required

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

      discount object required
      oneOf

      object

      times_redeemed integer required

      The number of times this coupon has been redeemed.

      duration_in_months integer 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_redemptions integer nullable required

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

      archived_at 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.

    Loading...