🌐
Shopify
shopify.dev › docs › api › functions › latest › discount
Discount Function API
Use the Discount Function API to create a single discount that applies to cart lines, order subtotal, and shipping rates.
🌐
Shopify
shopify.dev › docs › apps › build › discounts › build-discount-function
Build a Discount Function
<Notice type="info" title="Migrate your existing discount functions" > To learn how to migrate your existing Discount Functions to use the [Discount API](/docs/api/functions/reference/discount), refer to [Migrate to the Discount API](/docs/apps/build/discounts/mig...
People also ask

What are the limitations of Shopify Discount Functions?
Shopify Discount Functions may slow down on large carts and fail on very large collections due to system limits. Optimizing logic and using Rust can improve performance.
🌐
skailama.com
skailama.com › blog › shopify-discount-functions
Shopify Discount Functions: Implementation Guide & Migration Tips
What is the difference between discount codes and automatic discounts?
Discount codes require customers to enter a code at checkout, while automatic discounts apply on cart and checkout when conditions are met without manual input.
🌐
skailama.com
skailama.com › blog › shopify-discount-functions
Shopify Discount Functions: Implementation Guide & Migration Tips
What are some Shopify apps built on Shopify Discount Functions?
Apps like Kite: Discount & Free Gift, Supa Easy, Discount Kit, and Abra Promotions allow merchants to create custom discount rules, BOGO offers, bulk discounts, free gifts, and shipping promotions without coding. These apps integrate seamlessly with Shopify’s discount system for easy setup and management.
🌐
skailama.com
skailama.com › blog › shopify-discount-functions
Shopify Discount Functions: Implementation Guide & Migration Tips
🌐
Skailama
skailama.com › blog › shopify-discount-functions
Shopify Discount Functions: Implementation Guide & Migration Tips
October 29, 2025 - In either case, Shopify needs a record of a discount in the admin that corresponds to your function. The API call typically includes details like the function ID, the title of the discount, the strategy for how it combines with other discounts, etc.
🌐
GitHub
github.com › ramdhanishivam › discount-function-app
GitHub - ramdhanishivam/discount-function-app: Shopify Functions API - Javascript App for Discount
Shopify Functions API - Javascript App for Discount - GitHub - ramdhanishivam/discount-function-app: Shopify Functions API - Javascript App for Discount
Author   ramdhanishivam
🌐
Shopify
shopify.dev › changelog › new-discount-function-api
Introducing the new Discount Function API - Shopify developer changelog
This API allows you to create discounts that apply simultaneous savings to products, order totals, and/or shipping costs—a use case historically supported by Shopify Scripts. To learn more about the new Discount Function API, read our developer ...
🌐
Shopify
shopify.com › partners › blog › discount-kit-shopify-functions-webassembly-api
Discount Kit's Journey: Faster Checkouts with Shopify Functions (2025) - Shopify
This approach wasted compute cycles ... improvements have changed this landscape: The Discount API now allows apps to generate product, order, and shipping discounts—all powered by a single Discount Code....
🌐
Shopify
shopify.dev › docs › api › functions › latest › product-discount
Product Discount Function API (deprecated)
Use the Product Discount Function API to create a new type of discount that's applied to particular product variants or cart lines.
🌐
Shopify
shopify.dev › docs › api › functions › latest › shipping-discount
Shipping Discount Function API (deprecated)
A legacy shipping discount function that applies a discount to a specific shipping method if the delivery address is in a specific city. This example applies a 50% shipping discount to the express shipping method.
Find elsewhere
🌐
YouTube
youtube.com › watch
Shopify Functions - New Discount Function | Discount API - YouTube
In this video, we explore the new Discount Function, built on Shopify’s updated Discount API. This function provides a unified approach to creating discounts...
Published   April 28, 2025
🌐
Shopify
changelog.shopify.com › posts › discount-functions-support-on-shopify-pos
Discount Functions support on Shopify POS - Shopify Changelog
Discounts created by Discount Functions are automatically eligible on different sales channels, including Online Store and POS. Discount Functions can not be excluded from POS. Stores on any plan can use public apps that are distributed through the Shopify App Store and contain functions. Only stores on a Shopify Plus plan can use custom apps that contain Shopify Function APIs.
🌐
Shopify
shopify.dev › docs › api › functions › unstable › discounts-allocator
Discounts Allocator Function API
Use the API to implement custom logic that distributes discounts across items in a cart, with associated data such as buyer identity, discount codes, and metafields. ... You can install a maximum of one Discount Allocator Function on each store.
🌐
Gadget
gadget.dev › blog › understanding-shopify-functions-part-2
Understanding Shopify Functions. Part 2: What can they do, and how to build with them
The Product Discount API can apply amount or percentage-based discounts to individual products or variants, create discounts based on quantity of products, or create logic that provides free products if you buy a certain quantity of a specific product. Your function runs the logic that determines if the discount should be applied.
🌐
Shopify
shopify.dev › changelog › the-product-discount-function-api-now-supports-cart-line-targeting
The Product Discount Function API now supports cart line targeting - Shopify developer changelog
Target, allowing for the application of discounts on specific cart lines, a use case that has historically only been possible with Shopify Scripts. This update can be used to link discounts to attributed cart lines such as upsell products, free gifts with purchase, or buyer customized products. You can learn more about the Product Discount Function API here.
🌐
Shopify Developer Community
community.shopify.dev › functions
Discount combinations behavior in latest Discount Function API - Functions - Shopify Developer Community Forums
3 weeks ago - Hi everyone, I am using the latest Discount Function API for my app. I went through the documentation of combining discounts here. It says that multiple discounts can combine based on the combinesWith settings. Here all …
🌐
Blue Badger
badger.blue › blogs › ecommerce-unpacked › shopify-functions-guide-for-ecommerce-stores
Unlocking the Full Potential Of Shopify Functions | Blue Badger
September 12, 2025 - Prior to April 2025, this API was ... straightforward APIs, the Discount Function API allows you to add a new type of discount to all items, where you can expose custom business logic....
🌐
Stripe
docs.stripe.com › api › discounts
Discounts | Stripe API Reference
It contains information about when the discount began, when it will end, and what it is applied to.
🌐
Shopify Community
community.shopify.com › retired boards › appdev › functions
Discount Function API
October 10, 2023 - I am using the discount function API to reduce different prices for different products, but only one product is displayed on the shopping cart or checkout with a discount price applied, and other products are not effective. I think the corresponding Discounts type for the API is an array, which means that multiple discount information can be output, but the result only takes effect on one, which is far from what I expected.
🌐
Shopify
shopify.dev › docs › apps › build › discounts
About discounts
App discounts built with the Discount Function API can return operations that use Order and Product discount classes in their CartLinesDiscountsGenerateRunResult and the Shipping class in CartDeliveryOptionsDiscountsGenerateRunResult.