Setup
- Checkout UI extension (
purchase.checkout.payment-method-list.render-before, one page checkout),
upgraded from API 2025-07 to 2026-07 (Preact + globalshopify), deployed to production on September 28, 2026. - Our backend creates the code through the Admin API (
discountCodeBasicCreatefor discounts,giftCardCreatefor gift cards). Before returning it, the backend confirms it exists withcodeDiscountNodeByCode. - The extension applies it right away:
const { code } = await createCodeOnOurBackend();
const result = await shopify.applyDiscountCodeChange({ type: 'addDiscountCode', code });
// gift cards: shopify.applyGiftCardChange({ type: 'addGiftCard', code })
Problem
Since the upgrade, checkout often rejects the code it was just given. The Proposal response is:
code: REDUCTION_INVALID_CODE
nonLocalizedMessage: "Reduction code couldn't be mapped to neither a gift card or discount."
The buyer sees “Enter a valid discount code or gift card”.
What we’ve observed
- The code is valid: the same code is accepted when typed into the native discount field a few seconds later.
- Checkout validates the code in its
Proposalrequest (POST /checkouts/internal/graphql/persisted?operationName=Proposal), which Shopify sends when the extension callsapplyDiscountCodeChange/applyGiftCardChange. That request goes out about 10–25 ms after the Admin API confirmed the code exists, and its response returns theREDUCTION_INVALID_CODEerror. - Gift cards (
giftCardCreate+applyGiftCardChange) fail the same way. That suggests the problem is in how checkout looks up new codes, not specific to discounts. - Retrying doesn’t help. Calling
applyDiscountCodeChangeagain with the same code a second later returns an error without sending a new Proposal request. The native discount field does send a
new Proposal each time. - It started right after the 2025-07 → 2026-07 upgrade: the first reports came in the same day it went to production (September 28, 2026). Other stores run the same create-then-apply-once flow on 2025-07 and have never had this. Our backend and the create/apply sequence didn’t change with the upgrade.
- Our staging store rarely reproduces it; production does regularly.
Questions
- Did anything change between 2025-07 and 2026-07 (or 2025-10 / 2026-01 / 2026-04) in how
applyDiscountCodeChange/applyGiftCardChangelook up codes? - Is there an expected delay between creating a code via the Admin API and checkout being able to find it? If so, how long, and is there a way to know when a code is ready?
- Does the 2026-07 runtime cache a rejected code and answer repeat calls without sending a new Proposal? If so, what’s the recommended way to retry?
- What’s the recommended pattern for applying a code that the extension just created?