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 becomes invalid.
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. Product eligibility - Product must be in the products array (if not empty, applies to all products)
  5. Customer eligibility - Customer email must match customer_email (if specified)
The discount status is automatically updated to expired when:
  • The end_date has passed
  • The current date is before start_date
  • The usage_limit has been reached
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