Discount
Discount
Discount
Represents a discount that can be applied to subscriptions or purchases.
Discounts can be either a fixed amount off or a percentage off the total.
Kind: Object
Fields
| Field | Type | Description |
|---|---|---|
amountOff |
Int |
Fixed amount to discount in cents (e.g., 500 for $5.00 off) |
availabilitySchedule |
Schedule |
A schedule that describes when this discount is available for redemption (null for always available) |
createdAt |
DateTime! |
Timestamp when the discount was created |
duration |
DiscountDuration! |
How long the discount applies to a subscription |
durationInMonths |
Int |
Number of months the discount is applied (only used when duration is REPEATING) |
id |
ID! |
Unique identifier for the discount |
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) |
redeemBy |
DateTime |
Expiration date for the discount code (null for no expiration) |
updatedAt |
DateTime! |
Timestamp when the discount was last updated |
Definition
"""
Represents a discount that can be applied to subscriptions or purchases.
Discounts can be either a fixed amount off or a percentage off the total.
"""
type Discount {
"""Fixed amount to discount in cents (e.g., 500 for $5.00 off)"""
amountOff: Int
"""
A schedule that describes when this discount is available for redemption (null for always available)
"""
availabilitySchedule: Schedule
"""Timestamp when the discount was created"""
createdAt: DateTime!
"""How long the discount applies to a subscription"""
duration: DiscountDuration!
"""
Number of months the discount is applied (only used when duration is REPEATING)
"""
durationInMonths: Int
"""Unique identifier for the discount"""
id: ID!
"""
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)"""
percentOff: Int
"""Expiration date for the discount code (null for no expiration)"""
redeemBy: DateTime
"""Timestamp when the discount was last updated"""
updatedAt: DateTime!
}