Subscription contracts ignore discount combination settings, and recurring orders don’t count as code uses
We build a subscription app on the Admin GraphQL API (2026-07). On our merchants’ stores, customers ended up with several discount codes on one subscription that, by their own settings, may not be combined. Others re-used “once per customer” codes. We tested on a development store (test payments) where Shopify checks discount codes during a subscription’s life.
Summary
- Checkout enforces the combination settings (“Combines with”): of codes that don’t allow each other, only one applies.
- Creating or updating a subscription contract checks a code’s eligibility (dates, status, customer, products, minimum, uses at checkout), but never its combination settings, and doesn’t count recurring orders as uses.
- Billing attempts check nothing: every code on the contract is applied to the order, including codes that were deleted, expired or deactivated after they were added.
So a customer can put codes on a subscription that checkout would never let them combine, and gets all of them on every recurring order.
Setup
All codes: available on subscriptions, recurring cycle limit 10, no minimum, all customers.
| Code | Discount | Class | Combines with |
|---|---|---|---|
product_off |
10 % off products (collection “All products”) | Product | nothing |
order_off |
€10 off the order | Order | nothing |
order_off_5 |
5 % off the order | Order | nothing |
free_shipping |
free shipping | Shipping | nothing |
TFCOMB-PRODUCT-1001 (control) |
10 % off products | Product | order, shipping |
TFCOMB-ORDER-1001 (control) |
€3 off the order | Order | product, shipping |
One product (€9.99, weekly selling plan with 20 % off), quantity 2, shipping €4.90.
How each point was tested:
- Checkout: the Online Store cart,
POST /cart/update.jswith{"discount": "code1,code2"}. Shopify answers per code indiscount_codes[].applicable. - Subscription create:
subscriptionContractAtomicCreatewithdiscountCodes. - Subscription update:
subscriptionContractUpdate, thensubscriptionDraftDiscountCodeApplyper code, thensubscriptionDraftCommit. - Billing attempt:
subscriptionBillingAttemptCreateon the updated contract, then the order’sdiscountApplications.
“Accepted” below means: no userErrors, no rejectionReason, and the contract carries the code afterwards.
Test 1: combinations (2026-10-01)
| Codes | Settings allow them together? | Checkout (cart) | Subscription create | Subscription update | Billing attempt (order) |
|---|---|---|---|---|---|
product_off |
(single) | applies | accepted | accepted | applied, −€1.58 |
order_off |
(single) | applies | accepted | accepted | applied, −€10.00 |
free_shipping |
(single) | applies | accepted | accepted | applied, shipping −€4.90 |
product_off + order_off |
no | only order_off applies |
both accepted | both accepted | both applied, −€11.58 |
order_off + order_off_5 |
no | only order_off applies |
both accepted | both accepted | both applied, −€10.29 |
product_off + free_shipping |
no | only product_off applies |
both accepted | both accepted | both applied, −€6.48 |
order_off + free_shipping |
no | only order_off applies |
both accepted | both accepted | both applied, −€14.90 |
| all four | no | only order_off applies |
all four accepted | all four accepted | all four applied, −€16.70 |
TFCOMB-PRODUCT-1001 + TFCOMB-ORDER-1001 |
yes | both apply | both accepted | both accepted | both applied, −€4.58 |
Test 2: eligibility (2026-09-30)
The second column adds a code that is already invalid. The third column adds a valid code, makes it invalid in the admin, and then bills the subscription.
| The code … | Adding it (subscriptionDraftDiscountCodeApply) |
Next billing attempt after it became invalid |
|---|---|---|
| is expired, not started yet, or deactivated | refused: CURRENTLY_INACTIVE |
still applied |
| needs a minimum subtotal that isn’t met | refused: PURCHASE_NOT_IN_RANGE |
still applied (minimum raised) |
| is limited to other customers | refused: CUSTOMER_NOT_ELIGIBLE |
still applied |
| is limited to other products | refused: NO_ENTITLED_LINE_ITEMS |
not tested |
| is for one-time purchases only | refused: NO_ENTITLED_LINE_ITEMS |
still applied |
| is once per customer and was used on a regular order | refused: CUSTOMER_USAGE_LIMIT_REACHED |
still applied |
| reached its usage limit through a regular order | refused: USAGE_LIMIT_REACHED |
still applied |
| is once per customer and was used on recurring orders only | accepted | – |
| was deleted | – | still applied |
Notes:
- “Refused” means the mutation returns no
userErrors; the problem only shows inappliedDiscount.rejectionReason. We did not commit those drafts. - “Regular order” in this test means an order created with
orderCreateand the code, because our app can’t create checkouts or draft orders. - After two recurring orders with a once-per-customer code, the code’s
asyncUsageCountwas still 0 (each regular order counted 1), and Shopify accepted the code again for the same customer. - The subscription’s own copy of the code does count its uses (
usageCount, for the recurring cycle limit). But a removed and re-added code is a new copy that starts at 0 again.
Questions
- Is it intended that
subscriptionContractAtomicCreateandsubscriptionDraftDiscountCodeApplyignorecombinesWith, while checkout enforces it? If yes, is there an API that evaluates a set of codes the way the cart does (applicableper code), so apps can apply the same rules? - Should recurring orders count towards “Limit to one use per customer” and the total usage limit?
- Is it intended that billing attempts keep applying codes that were deleted, expired or deactivated after they were added?
- Does the subscription contract calculation API in 2026-10 change any of this?
What we do in the meantime
Before our app puts a code on a subscription, it:
- reads the code’s settings (
codeDiscountNodeByCode:appliesOncePerCustomer,usageLimit,discountClasses,combinesWith) - counts the customer’s orders that carried the code. We read every order’s
discountApplications, because the order searchdiscount_code:only matches an order’s first code. - refuses the code when its settings don’t allow it, using the same combination rule as checkout: each code must allow the other’s class.