Hey! These docs are for version 1.0, which is no longer officially supported. Click here for the latest version, 5.0!

discountcode object

Properties of the discountcode object.

Full discount code for application is formatted as {codeprefix}-{code}. You can apply this to a customer, a subscription or a subscription charge.

  /* id of object, set by Upodi */
  "id": "guid",
  /* required */
  "codeprefix" : "string",
  /* required. a code */
  "code" : "string",
  /* active=0, expired=1, consumed=2 */
  "state" : "integer",
  /* allows null, or the end date of the valid use. */
  "expiredate": "guid",
  /* readonly. number of times the code is consumed */
  "usecount" : "integer",
  "discountid" : "guid",
  /* 0 for endless, a positive number for the times a code can be used */
  "redemption" : "int",
  "discount" : "discount object"