How many discount codes a Shopify cart applies: five, and the sixth is set aside

A Storefront API cart lists every code it is sent and honours the first five. A sixth is set aside with a warning, even when it is valid and the five ahead of it discounted nothing. A free-shipping code is not one of the five.

Verified 3 November 2026 on Shopify’s 2026-10 API, in carts built on a real store. Each statement marked with a tick is checked against the cart Shopify returned.

Fifth place applies, sixth place does not

The same code, on the same line, in two carts. Behind four codes the store does not have, it applied. Behind five, it did not, and the cart said so in a warning.

A real code in fifth place, behind four the store does not haveVerified 3 November 2026 · API 2026-10

Into the cart

  • 1 × Single Bag at $40.00, bought once
  • No cart attribute, so the app's functions return no operations
  • Code VERIFY-NO-SUCH-CODE-1: not a code on the store
  • Code VERIFY-NO-SUCH-CODE-2: not a code on the store
  • Code VERIFY-NO-SUCH-CODE-3: not a code on the store
  • Code VERIFY-NO-SUCH-CODE-4: not a code on the store
  • Code VERIFY-BAG5: $5.00 off the bag, one-time purchases only, combines with product, order and shipping discounts

What Shopify returned

The cart Shopify returned: A real code in fifth place, behind four the store does not have
LineQuantityPriceDiscounts on the lineLine total
Single Bag1$40.00−$5.00 code VERIFY-BAG5$35.00
Discounts on the cartnone
Cart total$35.00
  • VERIFY-BAG5 applicable: true
  • VERIFY-NO-SUCH-CODE-1 applicable: false
  • VERIFY-NO-SUCH-CODE-2 applicable: false
  • VERIFY-NO-SUCH-CODE-3 applicable: false
  • VERIFY-NO-SUCH-CODE-4 applicable: false
  • warning DISCOUNT_NOT_FOUND “Enter a valid discount code”

What that shows

  • The fifth code applied: $5.00 off the line, a cart total of $35.00.
  • The four unknown codes were listed as not applicable, and the cart's only warning was DISCOUNT_NOT_FOUND.
The same code in sixth place, behind five the store does not haveVerified 3 November 2026 · API 2026-10

Into the cart

  • 1 × Single Bag at $40.00, bought once
  • No cart attribute, so the app's functions return no operations
  • Code VERIFY-NO-SUCH-CODE-1: not a code on the store
  • Code VERIFY-NO-SUCH-CODE-2: not a code on the store
  • Code VERIFY-NO-SUCH-CODE-3: not a code on the store
  • Code VERIFY-NO-SUCH-CODE-4: not a code on the store
  • Code VERIFY-NO-SUCH-CODE-5: not a code on the store
  • Code VERIFY-BAG5: $5.00 off the bag, one-time purchases only, combines with product, order and shipping discounts

What Shopify returned

The cart Shopify returned: The same code in sixth place, behind five the store does not have
LineQuantityPriceDiscounts on the lineLine total
Single Bag1$40.00none$40.00
Discounts on the cartnone
Cart total$40.00
  • VERIFY-BAG5 applicable: false
  • VERIFY-NO-SUCH-CODE-1 applicable: false
  • VERIFY-NO-SUCH-CODE-2 applicable: false
  • VERIFY-NO-SUCH-CODE-3 applicable: false
  • VERIFY-NO-SUCH-CODE-4 applicable: false
  • VERIFY-NO-SUCH-CODE-5 applicable: false
  • warning DISCOUNT_CODE_NOT_HONOURED “The VERIFY-BAG5 discount code is not honoured”
  • warning DISCOUNT_NOT_FOUND “Enter a valid discount code”

What that shows

  • The cart was created and listed all six codes.
  • The sixth code, valid and applicable to the line, was listed as not applicable, with the warning DISCOUNT_CODE_NOT_HONOURED. The line cost its full $40.00.
  • The five codes ahead of it took the five places without discounting anything: a code the store does not have still counts.

The place in the list decides, not the code

The same six codes again with the real one first. It applied, and the warning moved to whichever code was now sixth.

The same six codes with the real one firstVerified 3 November 2026 · API 2026-10

Into the cart

  • 1 × Single Bag at $40.00, bought once
  • No cart attribute, so the app's functions return no operations
  • Code VERIFY-BAG5: $5.00 off the bag, one-time purchases only, combines with product, order and shipping discounts
  • Code VERIFY-NO-SUCH-CODE-1: not a code on the store
  • Code VERIFY-NO-SUCH-CODE-2: not a code on the store
  • Code VERIFY-NO-SUCH-CODE-3: not a code on the store
  • Code VERIFY-NO-SUCH-CODE-4: not a code on the store
  • Code VERIFY-NO-SUCH-CODE-5: not a code on the store

What Shopify returned

The cart Shopify returned: The same six codes with the real one first
LineQuantityPriceDiscounts on the lineLine total
Single Bag1$40.00−$5.00 code VERIFY-BAG5$35.00
Discounts on the cartnone
Cart total$35.00
  • VERIFY-BAG5 applicable: true
  • VERIFY-NO-SUCH-CODE-1 applicable: false
  • VERIFY-NO-SUCH-CODE-2 applicable: false
  • VERIFY-NO-SUCH-CODE-3 applicable: false
  • VERIFY-NO-SUCH-CODE-4 applicable: false
  • VERIFY-NO-SUCH-CODE-5 applicable: false
  • warning DISCOUNT_CODE_NOT_HONOURED “The VERIFY-NO-SUCH-CODE-5 discount code is not honoured”
  • warning DISCOUNT_NOT_FOUND “Enter a valid discount code”

What that shows

  • In first place the code applied: $5.00 off, a cart total of $35.00. Which code is set aside is decided by its place in the list.
  • The cart still returned the warning DISCOUNT_CODE_NOT_HONOURED, for the code in sixth place.

A free-shipping code is counted apart

A free-shipping code in sixth place, behind the same five, applied to the selected rate.

A free-shipping code in sixth placeVerified 3 November 2026 · API 2026-10

Into the cart

  • 1 × Single Bag at $40.00, bought once
  • No cart attribute, so the app's functions return no operations
  • Code VERIFY-NO-SUCH-CODE-1: not a code on the store
  • Code VERIFY-NO-SUCH-CODE-2: not a code on the store
  • Code VERIFY-NO-SUCH-CODE-3: not a code on the store
  • Code VERIFY-NO-SUCH-CODE-4: not a code on the store
  • Code VERIFY-NO-SUCH-CODE-5: not a code on the store
  • Code VERIFY-SHIPFREE: free shipping, one-time purchases only, combines with product and order discounts
  • A US delivery address, with the cheapest rate selected

What Shopify returned

The cart Shopify returned: A free-shipping code in sixth place
LineQuantityPriceDiscounts on the lineLine total
Single Bag1$40.00none$40.00
Discounts on the cartnone
Delivery: Standard selectedQuoted: Standard $8.00, Express $15.00−$8.00 code VERIFY-SHIPFREE$0.00
Cart total$40.00
  • VERIFY-NO-SUCH-CODE-1 applicable: false
  • VERIFY-NO-SUCH-CODE-2 applicable: false
  • VERIFY-NO-SUCH-CODE-3 applicable: false
  • VERIFY-NO-SUCH-CODE-4 applicable: false
  • VERIFY-NO-SUCH-CODE-5 applicable: false
  • VERIFY-SHIPFREE applicable: true
  • warning DISCOUNT_NOT_FOUND “Enter a valid discount code”

What that shows

  • The free-shipping code applied from sixth place: the $8.00 Standard rate was discounted in full, and the cart total was $40.00.
  • The cart returned no DISCOUNT_CODE_NOT_HONOURED warning: a shipping code does not take one of the five places.

What to do in a code field

A code field that appends each attempt to the cart's list sets aside the right code after five wrong ones. Send the cart only the codes that can apply, and replace the list instead of growing it.

Read the warnings. DISCOUNT_CODE_NOT_HONOURED also marks a code refused beside another discount, so check how many codes the cart holds before reading it as a combination problem.

How this was verified

Every cart on this page was built through the Storefront API on a Shopify Plus development store we keep for this, on API version 2026-10, and read back as Shopify priced it. The store sells one product in these carts: Single Bag, at $40.00, also sold on a selling plan named “Every 30 days” that has no pricing policy. It quotes two delivery rates to a US address.

It has one automatic app discount, titled “Offer Suite”, with a product class and a shipping class, set to combine with product, order and shipping discounts. Its function reads a cart attribute: with it, the function takes 25% off one unit of Single Bag bought once, or $8.00 off the unit on its selling plan, and makes the cheapest delivery rate free. Without it, the function returns no operations.

The other discounts in these carts, as they are set on the store
DiscountClassGivesCombination setting
Code VERIFY-BAG5Product$5.00 off the bag, one-time purchases onlycombines with product, order and shipping discounts
Code VERIFY-SHIPFREEShippingfree shipping, one-time purchases onlycombines with product and order discounts

A suite builds these carts again and reads the discount settings from the store before it does. A statement that no longer matches the cart takes this page down until it is corrected, and no cart stands for more than 90 days without being built again. This is what one store returned on one API version: your store’s plan, markets and other apps can change the result, so build the cart.

Seen something different on your store? Write to privacy@offersuite.io with the cart and we’ll run it.