Requires Apps must have read_discounts access scope.

The type of discount associated with the discount code. For example, the discount code might offer a basic discount of a fixed percentage, or a fixed amount, on specific products or the order. Alternatively, the discount might offer the customer free shipping on their order. A third option is a Buy X, Get Y (BXGY) discount, which offers a customer discounts on select products if they add a specific product to their order.


value-discountcodeapp
object
Access requirements

The DiscountCodeApp object stores information about code discounts that are managed by an app using Shopify Functions. Use DiscountCodeApp when you need advanced, custom, or dynamic discount capabilities that aren't supported by Shopify's native discount types.

Learn more about creating custom discount functionality.


Note

The DiscountAutomaticApp object has similar functionality to the DiscountCodeApp object, with the exception that DiscountAutomaticApp stores information about automatic discounts that are managed by an app using Shopify Functions.


The DiscountCodeBasic object lets you manage amount off discounts that are applied on a cart and at checkout when a customer enters a code. Amount off discounts give customers a fixed value or a percentage off the products in an order, but don't apply to shipping costs.

The DiscountCodeBasic object stores information about amount off code discounts that apply to specific products and variants, collections, or all items in a cart.

Learn more about working with Shopify's discount model, including limitations and considerations.


Note

The DiscountAutomaticBasic object has similar functionality to the DiscountCodeBasic object, but discounts are automatically applied, without the need for customers to enter a code.


The DiscountCodeBxgy object lets you manage buy X get Y discounts (BXGY) that are applied on a cart and at checkout when a customer enters a code. BXGY discounts incentivize customers by offering them additional items at a discounted price or for free when they purchase a specified quantity of items.

The DiscountCodeBxgy object stores information about BXGY code discounts that apply to specific products and variants, collections, or all items in a cart.

Learn more about working with Shopify's discount model, including limitations and considerations.


Note

The DiscountAutomaticBxgy object has similar functionality to the DiscountCodeBxgy object, but discounts are automatically applied, without the need for customers to enter a code.


The DiscountCodeFreeShipping object lets you manage free shipping discounts that are applied on a cart and at checkout when a customer enters a code. Free shipping discounts are promotional deals that merchants offer to customers to waive shipping costs and encourage online purchases.

The DiscountCodeFreeShipping object stores information about free shipping code discounts that apply to specific products and variants, collections, or all items in a cart.

Learn more about working with Shopify's discount model, including limitations and considerations.


Note

The DiscountAutomaticFreeShipping object has similar functionality to the DiscountCodeFreeShipping object, but discounts are automatically applied, without the need for customers to enter a code.



Was this section helpful?

The underlying code discount object.


Was this section helpful?
union DiscountCode = DiscountCodeApp | DiscountCodeBasic | DiscountCodeBxgy | DiscountCodeFreeShipping