Attributes

AttributeDescription
id intUnique identifier for the object.
name stringName of the coupon displayed to customers on for instance invoices or receipts.
code stringThe code the customer can redeem the coupon with.
percent_off floatPercent that will be taken off the subtotal of any invoices for this customer for the duration of the coupon. For example, a coupon with percent_off of 50 will make a $100 invoice $50 instead.
duration stringCan either be forever, or once. Describes how long a customer who applies this coupon will get the discount.
redeem_by timestampDate of the last day this coupon can be used.
max_redemptions intThe maximum number of times the coupon can be redeemed.
plans arrayAn array of plan IDs that are associated to this coupon. An attempt to create a subscription with a plan that is not part of the associated coupons with the plan will fail.
metadata objectSet of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
created_at timestampTime at which the object was created. Measured in seconds since the Unix epoch.
updated_at timestampTime at which the object was last updated. Measured in seconds since the Unix epoch.