A developer building a headless Shopify storefront encountered a limitation: Shopify’s 25 discount code maximum per checkout prevents applying item-specific volume discounts across multiple product lines.
Key Requirements:
Must work with Storefront API and checkoutUrl (headless setup)
Needs dynamic volume-based discounts (e.g., 10% off when buying 5+ items)
Cannot rely on theme/Liquid code
Proposed Solution:
Shopify Functions was recommended as the primary approach:
Requires Shopify Plus for custom deployment, or use of third-party apps for non-Plus merchants
One responder offered their app as a solution for implementing function-based discounts
Workaround Attempted:
The original poster tested Orichi - Bundle app, which appeared promising during testing and correctly applied discounts in checkout.
Limitations Noted:
Function-based solutions provide total discounts only, not per-product breakdowns in checkout
Implementation requires significant setup work
Status: The thread remains unresolved with no confirmed final solution marked, though the poster indicated progress with the bundle app approach.
Summarized with AI on October 28.
AI used: claude-sonnet-4-5-20250929.
I’m using Shopify in Storefront API mode with a custom frontend, and I’m generating the checkout via the checkoutUrl. I want to apply volume-based discounts (e.g., buy 5+, get 10% off), but I’ve run into a major limitation:
Shopify only allows up to 25 discount codes per checkout, which makes it impossible to apply item-specific volume discounts across multiple product lines using separate codes.
I’m looking for a solution that:
Works outside the Online Store / theme (so NOT relying on theme Liquid code)
Is compatible with the Storefront API
Works with the checkoutUrl, or is otherwise applicable in a headless setup
Allows for dynamic discount logic (ideally based on cart content and quantity)
My Questions:1. Is there a Shopify app that supports this use case in a headless / Storefront API setup?
Are there workarounds or best practices to apply dynamic volume discounts via a single discount code (e.g., generated via Admin API)?
Does Shopify Functions or checkout extensions provide a path forward here (if I’m not on Plus)?
Any tips or insights would be super appreciated. Thanks!
@JohaBu We’ve been working with a few plus merchants who run headless storefronts and help them with solving for extended discount functionality through Shopify functions.
Here’s how your config would look like on our app’s backend. Just as an example for illustration purposes.
Yes - if you’re not on Plus, you’d need to use a publically available app like ours to setup function based discounts.
No - Shopify’s discount codes are designed to solve much more basic use cases and are single purpose in nature. Ie one code only does one logic. Functions extends this capability and lets you overcome these limitations.
Yes - you are correct here. Shopify functions is the way forward if you want to extend discount functionality to support your custom business use cases. Unfortunately, only plus merchants can deploy their own apps with custom functions.
Questions for you
Do you expect this discount to apply automatically / manually applied as a coupon code by the user?
If manual in nature - would you be controlling when the discount is applied on your headless instance ?
This is a good way to handle it indeed, and i tried doing so.
It works, the only cons are:
i only get a total discount (for the total sum), and not a detailed discount per product in the checkout (important for some clients)
pretty much workload for a quick fix
i found it worked very good with Orichi - Bundle
free to use App and the discounts are applied correctly in checkout (still in testing phase, but looks very promising)