Skip to main content
Discounts allow you to offer promotional pricing to your customers. Create percentage or fixed-amount discounts with optional usage limits, expiration dates, product restrictions, and customer-specific codes.

Discount Object

A discount contains the following information:

Discount Types

Discount Statuses

Listing Discounts

Retrieve all discounts for your store:

Query Parameters

Filtering Examples

Example Response

Getting a Single Discount

Retrieve a specific discount by its public ID:

Applying Discounts at Checkout

Use a discount code when initiating checkout:

Discount Restrictions

Discounts can have various restrictions:
Limit how many times a discount can be used:
When usage_count reaches usage_limit, the discount is rejected at checkout. usage_limit_per_customer caps the successful uses by a single customer email.
Set start and end dates for the discount:
The discount is only valid between these dates.
Limit the discount to specific products:
If products is empty, the discount applies to all products.
Limit the discount to a specific customer:
Only the specified customer can use this discount.

Discount Validation

When applying a discount at checkout, it’s automatically validated against these criteria:
  1. Status - Must be active
  2. Date range - Current date must be within start_date and end_date (if specified)
  3. Usage limit - usage_count must not have reached usage_limit (if specified)
  4. Per-customer limit - The customer must not have reached usage_limit_per_customer successful uses (if specified)
  5. Product eligibility - Product must be in the products array (if not empty, applies to all products)
  6. Customer eligibility - Customer email must match customer_email (if specified)
  7. Fixed amount - A fixed discount cannot exceed the product’s current price
The discount status changes to expired once its end_date has passed (a scheduled task updates it). A discount that has reached its usage limit, or whose start_date is still in the future, keeps its active status but is rejected at checkout. If validation fails during checkout, the API will return an appropriate error message.

Common Use Cases

Track discount performance for marketing campaigns:
Create unique discount codes for affiliates and track usage:
Create single-use discounts for VIP customers:

Checkout Guide

Apply discounts during checkout

Discounts API

View the complete Discounts API reference