Promo Code Object

Example Promo Code Object
{
  "code": "FIVEBUCKSOFF",
  "optional": false,
  "merchant_id": "A3GH440E2AFGH4",
  "discount_amount": 500
}

Attributes

AttributeTypeDescription
codeStringThe promo code to apply (required)
optionalBoolean(Optional) Should we continue placing the order if this code fails to apply? Defaults to false.
merchant_idString(Optional) If supplied, only try this code if we selected an offer from the given merchant.
discount_amountNumber(Optional) Fixed amount in cents by which we should discount the matching merchant’s offers during offer selection. Only makes sense if merchant_id is also supplied. Defaults to 0.
discount_percentageNumber(Optional) Percentage amount (between 0 and 100) by which we should discount the matching merchant’s offers during offer selection. Only makes sense if merchant_id is also supplied. Defaults to 0.
cost_overrideNumber(Optional) If supplied, we will assume all offers by this merchant cost exactly this many cents. Only makes sense if merchant_id is also supplied. Overrides other discount methods.