Learn how to set up a Discount Code in the Merchant Center.
After completing this page, you should be able to:
- Set up a Discount Code in the Merchant Center by completing all required fields and associating it with an existing Cart Discount.
Before using Discount Codes in the Merchant Center, ensure the Discount code field is set to Required for the Cart Discount. Only then will that Cart Discount be available for association with a Discount Code.

Let’s now look at how to set up Discount Codes by using them with two of the Cart Discounts we have already set up in our Cart Discounts module: use case 2 and use case 5.
- In use case 2, both Shoes for Feet and Tread Trends offer a US$25 discount on their new season items when the Cart total is over US$300.
- In use case 5, both the brands offer free shipping to their Gold and Platinum Customers when the Cart total is over US$50.
Both these discounts would work well with Discount Codes. The brands can distribute the codes to their customer mailing lists and further increase their promotion's reach.
Discount Code interface
General Info
The General Info section is very similar to the General Information in regular Cart Discounts, but includes some additional fields:
- Max applications (optional): the number of times the Discount Code can be applied.
- Max applications per customer (optional): the number of times the Discount Code can be applied per Customer.
- Code: a unique value—recommended in uppercase—for the Discount Code.
- Groups (optional): a tag or keyword for your Discount Code that can be used to search for Discount Codes with the same keyword.
For the example use cases mentioned above, evaluate if the additional (field) configurations are relevant to your needs. Discount Code usage limits can impact profitability, and groups assignments can streamline discount management, especially when handling numerous codes.
Condition
In the Condition section, you can add a Predicate for the Discount Code. Since the field only supports text entry, this might be challenging for some users. For easier creation, use the visual predicate builder in the Cart Discounts interface (in the Under these cart conditions section). Then, toggle the Editing options to copy the Predicate in plaintext and paste it in the Condition field on the Discount Code interface.

Consider if two predicates (one for Cart Discounts, one for Discount Codes) are necessary, as highlighted previously. If used, ensure that both the Predicates do not conflict and stop the discount from being applied. Considering this, it’s recommended to just use one Predicate—build the Predicate with the Cart Discount interface as its more user friendly; use two Predicates when specifically required.
For our example use cases, a Predicate for the Discount Code is unnecessary. The Predicate for the Cart Discount already handles cart eligibility, so adding another Predicate would provide no additional filtering or control.
Cart discounts
The Cart discounts section is straightforward—select the Cart Discount associated with the Discount Code. If a Cart Discount isn't listed, ensure if the Discount code field is set to Required for that Cart Discount—as mentioned previously.
With this knowledge, you’re now ready to set up your Discount Codes and reward your customers!