CreateDiscountInput

CreateDiscountInput

Input for creating a new discount. You must specify either amountOff (fixed amount)
or percentOff (percentage), but not both. The duration determines how long the
discount applies to subscriptions.

Kind: Input

Fields

Field Type Description
amountOff Int Fixed amount to discount in cents (e.g., 500 for $5.00 off). Mutually exclusive with percentOff
availabilitySchedule ScheduleInput A schedule that describes when this discount is available for redemption (null for always available)
duration DiscountDuration! How long the discount applies to a subscription
durationInMonths Int Number of months the discount is applied (required when duration is REPEATING)
maxRedemptions Int Maximum number of times this discount can be redeemed (null for unlimited)
name String! Human-readable name for the discount
percentOff Int Percentage off (e.g., 20 for 20% off). Mutually exclusive with amountOff
redeemBy DateTime Expiration date for the discount code (null for no expiration)

Definition

"""
Input for creating a new discount. You must specify either amountOff (fixed amount)
or percentOff (percentage), but not both. The duration determines how long the
discount applies to subscriptions.
"""
input CreateDiscountInput {
  """
  Fixed amount to discount in cents (e.g., 500 for $5.00 off). Mutually exclusive with percentOff
  """
  amountOff: Int
  """
  A schedule that describes when this discount is available for redemption (null for always available)
  """
  availabilitySchedule: ScheduleInput
  """How long the discount applies to a subscription"""
  duration: DiscountDuration!
  """
  Number of months the discount is applied (required when duration is REPEATING)
  """
  durationInMonths: Int
  """
  Maximum number of times this discount can be redeemed (null for unlimited)
  """
  maxRedemptions: Int
  """Human-readable name for the discount"""
  name: String!
  """
  Percentage off (e.g., 20 for 20% off). Mutually exclusive with amountOff
  """
  percentOff: Int
  """Expiration date for the discount code (null for no expiration)"""
  redeemBy: DateTime
}