A coupon contains information about an amount-based or percentage-based discount which can be applied to a customer order through promotion codes.

Attributes
idstring
Unique identifier for the Coupon object.
objectstring, value is "coupon"
A string representing the object’s type. Objects of the same type share the same value.
activeboolean
Has the value true if the coupon is active and can be used, or the value false if it is not.
createdAttimestamp
Time at which the object was created. Measured in milliseconds since the Unix epoch.
currencystring
If the discountType is amount, three-letter ISO currency code, in lowercase. Must be a supported currency.
discountAmountpositive number
If the discountType is amount, the discount amount of this coupon object.
discountPercentagenumber
If the discountType is percentage, the discount percentage of this coupon object.
discountTypeenum
The type of discount of this coupon.
Possible enum values
  • amount

    A coupon for a fixed amount

  • percentage

    A coupon for a percentage of the amount

expiresAttimestampor null
Time at which the Coupon expires. Measured in milliseconds since the Unix epoch.
maxRedemptionCountpositive integeror null
Maximum number of times this coupon can be redeemed, in total, across all customers, before it is no longer valid.
metadataobject
Set of key-value pairs that you can attach to the Coupon object.
namestring
The coupon's name, meant to be displayable to the customer.
redemptionCountpositive integer
Number of times this coupon has been applied to an order.
sponsoredboolean
Has the value true if the coupon is Smartpay funded, or the value false if it is not.
testboolean
A flag with a value false if the object exists in live mode or true if the object exists in test mode.
updatedAttimestamp
Time at which the object was last updated. Measured in milliseconds since the Unix epoch.