Skip to main content

Coupon

Represents a coupon that can be associated with a discount.

type Coupon {
amountOff: Int
createdAt: DateTime!
duration: CouponDuration!
durationInMonths: Int
id: ID!
maxRedemptions: Int
name: String
percentOff: Int
timesRedeemed: Int!
valid: Boolean!
}

Fields

Coupon.amountOff ● Int scalar common

A positive integer representing the amount to subtract from an invoice total (required if percent_off is not passed).

Coupon.createdAt ● DateTime! non-null scalar common

Time at which the object was created. Measured in seconds since the Unix epoch.

Coupon.duration ● CouponDuration! non-null enum common

The duration applied for this coupon

Coupon.durationInMonths ● Int scalar common

If duration is repeating, the number of months the coupon applies. Null if coupon duration is forever or once.

Coupon.id ● ID! non-null scalar common

The external id for this coupon

Coupon.maxRedemptions ● Int scalar common

Maximum number of times this coupon can be redeemed, in total, across all customers, before it is no longer valid.

Coupon.name ● String scalar common

Name of the coupon displayed to customers on for instance invoices or receipts.

Coupon.percentOff ● Int scalar common

A positive float larger than 0, and smaller or equal to 100, that represents the discount the coupon will apply (required if amount_off is not passed).

Coupon.timesRedeemed ● Int! non-null scalar common

Number of times this coupon has been applied to a customer.

Coupon.valid ● Boolean! non-null scalar common

Taking account of the above properties, whether this coupon can still be applied to a customer.

Member of

Discount object