Discount

The Discount object represents a price reduction that can be applied to purchases.

A Discount object represents a price reduction that can be applied to customer purchases. Discounts can be either coupon codes that customers enter at checkout, or automatic sales that apply based on configured rules.

Discounts support both fixed amounts and percentage-based reductions, with optional validity periods and usage limits. You can target discounts to specific Offers or apply them store-wide. Applied discounts are visible on Payment objects.

Endpoints

MethodEndpointDescription
GET/v0/discounts/listList and filter discounts
POST/v0/discounts/createCreate a new discount
GET/v0/discounts/{discountId}Retrieve a discount
PATCH/v0/discounts/{discountId}/updateUpdate a discount
PATCH/v0/discounts/{discountId}/archiveArchive a discount

The Discount object

objectstring

Object type identifier. Always "discount" for Discount objects.

idstringrequired

Unique identifier (UUID) for this discount.

typestringrequired

Discount type. Possible values: code (coupon code), sale (automatic discount)

namestring | null

Display name of the discount (e.g., "Summer Sale", "10% Off").

amountnumberrequired

Discount amount. For fixed: amount in currency units (e.g., 10.00 for $10). For percentage: percentage value (e.g., 15 for 15% off).

amountTypestringrequired

How the amount is applied. Possible values: fixed, percentage

discountCodestring | null

The coupon code customers enter. Only set when type is "code".

currencystringrequired

Three-letter ISO 4217 currency code. Required for fixed-amount discounts.

statusstringrequired

Current discount status. Possible values: active, inactive

validFrominteger | null

Unix timestamp (milliseconds) when the discount becomes valid. null means immediately valid.

validUntilinteger | null

Unix timestamp (milliseconds) when the discount expires. null means no expiration.

purchaseLimitinteger | null

Maximum number of times this discount can be used. null means unlimited.

timesUsedinteger

Number of times this discount has been used. Defaults to 0.

includesAllOffersboolean

Whether this discount applies to all Offers. Defaults to false.

excludedOffersarray

Array of Offer IDs that are excluded from this discount when includesAllOffers is true.


Discount types

Coupon codes

Coupon codes require customers to enter a code at checkout. They're ideal for:

  • Marketing campaigns
  • Influencer partnerships
  • Customer retention offers
  • Limited-time promotions

Automatic sales

Sales apply automatically without customer action. They're ideal for:

  • Site-wide promotions
  • Product launches
  • Holiday sales
  • Flash sales

Example response

{
  "status": "success",
  "data": {
    "discount": {
      "object": "discount",
      "id": "880e8400-e29b-41d4-a716-446655440003",
      "type": "code",
      "name": "Summer Sale 2024",
      "amount": 15,
      "amountType": "percentage",
      "discountCode": "SUMMER15",
      "currency": "USD",
      "status": "active",
      "validFrom": 1717200000000,
      "validUntil": 1725148800000,
      "purchaseLimit": 1000,
      "timesUsed": 247,
      "includesAllOffers": true,
      "excludedOffers": []
    }
  }
}

Last updated