Promotion codes
The promotion_code object
A promotion code is a code customers enter to get a coupon's discount, with its own limits on who can use it, when and how often. Paycose creates one automatically for each new coupon.
Attributes
idstringRequiredUnique identifier for the object.
objectstringRequiredString naming the object's type.
livemodebooleanRequiredtruewhen the object exists in live mode,falsein test mode.createdtimestampRequiredTime the object was created, in Unix seconds.
updatedtimestampRequiredTime the object last changed, in Unix seconds.
couponstringRequiredID of the coupon whose discount the code applies.
codestringRequiredThe code customers enter. Codes are matched ignoring letter case and are unique in your account.
activebooleanRequiredWhether the code can be redeemed. The code also stops working while its coupon is inactive.
quota_usedintegerRequiredNumber of times the code has been redeemed.
quota_limitintegerRequiredNullableMaximum number of times the code can be redeemed. Null when there is no limit.
expires_attimestampRequiredNullableTime after which the code can no longer be redeemed, in Unix seconds. Null when it doesn't expire.
starts_attimestampRequiredNullableEarliest time the code can be redeemed, in Unix seconds. Null when it can be redeemed right away.
first_time_transactionbooleanRequiredWhether only customers without any successful payment yet can redeem the code.
customerstringRequiredID of the only customer who can redeem the code. Empty when any customer can.
minimum_amountintegerRequiredNullableMinimum subtotal, in the smallest currency unit, a document must reach for the code to apply. Null when there is no minimum.
minimum_amount_currencystringRequiredCurrency of
minimum_amount, in lowercase; a document in another currency is refused. Empty when not set.metadataobjectRequiredKey-value pairs you attach to the object for your own use. Paycose never reads or changes them.