How to apply volume discounts with Storefront API + checkoutUrl (limited by 25 discount codes)?

How to apply volume discounts with Storefront API + checkoutUrl (limited by 25 discount codes)?

JohaBu
Tourist
4 0 4

Hi everyone,

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?

  2. Are there workarounds or best practices to apply dynamic volume discounts via a single discount code (e.g., generated via Admin API)?

  3. 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!

Replies 3 (3)
JohaBu
Tourist
4 0 4

Thank you!

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)

Abel_Lesle
Shopify Partner
237 2 17

@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. 

Abel_Lesle_0-1744115428774.png

 

 

Answers for your questions 

  1. Yes - if you're not on Plus, you'd need to use a publically available app like ours to setup function based discounts. 
  2. 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.

  3. 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 ?

 

Thank you and wish you a great day 🙂

 

Founder
Dollarlabs: Ultimate Discounts (5★) – If you can think of a discount, you can build it
Dollarback: Cashback & Loyalty (5★) – Simple cashback. Powerful loyalty.

Abel_Lesle
Shopify Partner
237 2 17

Hi @JohaBu , wanted to check and see if you found a solution / fixed the issue you mentioned.

 

If so - can you share your solution / mark a solution here so that others may find value from the answer as well.

 

Thank you 🙂

Founder
Dollarlabs: Ultimate Discounts (5★) – If you can think of a discount, you can build it
Dollarback: Cashback & Loyalty (5★) – Simple cashback. Powerful loyalty.