You can offer your customers a fixed value, percentage, or shipping discount on products, collections, or variants in your store. If you sell online, then you can offer buy X get Y discounts to encourage customers to buy items.
You can specify the following:
- the dates for which the code is valid
- the number of times that a code can be used
- a minimum order amount before the code can be used
- which products, collections, or variants the discount can be applied to.
Source: https://help.shopify.com/en/manual/discounts/create-discount-codes