Skip to Content
Paycose Docs
Promotion codes

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

  • idstringRequired

    Unique identifier for the object.

  • objectstringRequired

    String naming the object's type.

  • livemodebooleanRequired

    true when the object exists in live mode, false in test mode.

  • createdtimestampRequired

    Time the object was created, in Unix seconds.

  • updatedtimestampRequired

    Time the object last changed, in Unix seconds.

  • couponstringRequired

    ID of the coupon whose discount the code applies.

  • codestringRequired

    The code customers enter. Codes are matched ignoring letter case and are unique in your account.

  • activebooleanRequired

    Whether the code can be redeemed. The code also stops working while its coupon is inactive.

  • quota_usedintegerRequired

    Number of times the code has been redeemed.

  • quota_limitintegerRequiredNullable

    Maximum number of times the code can be redeemed. Null when there is no limit.

  • expires_attimestampRequiredNullable

    Time after which the code can no longer be redeemed, in Unix seconds. Null when it doesn't expire.

  • starts_attimestampRequiredNullable

    Earliest time the code can be redeemed, in Unix seconds. Null when it can be redeemed right away.

  • first_time_transactionbooleanRequired

    Whether only customers without any successful payment yet can redeem the code.

  • customerstringRequired

    ID of the only customer who can redeem the code. Empty when any customer can.

  • minimum_amountintegerRequiredNullable

    Minimum subtotal, in the smallest currency unit, a document must reach for the code to apply. Null when there is no minimum.

  • minimum_amount_currencystringRequired

    Currency of minimum_amount, in lowercase; a document in another currency is refused. Empty when not set.

  • metadataobjectRequired

    Key-value pairs you attach to the object for your own use. Paycose never reads or changes them.