Checkout UI extension (API 2026-07): applyDiscountCodeChange / applyGiftCardChange reject just-created codes with REDUCTION_INVALID_CODE — regression after upgrading from 2025-07

Setup

  • Checkout UI extension (purchase.checkout.payment-method-list.render-before, one page checkout),
    upgraded from API 2025-07 to 2026-07 (Preact + global shopify), deployed to production on September 28, 2026.
  • Our backend creates the code through the Admin API (discountCodeBasicCreate for discounts, giftCardCreate for gift cards). Before returning it, the backend confirms it exists with codeDiscountNodeByCode.
  • 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 Proposal request (POST /checkouts/internal/graphql/persisted?operationName=Proposal), which Shopify sends when the extension calls applyDiscountCodeChange / applyGiftCardChange. That request goes out about 10–25 ms after the Admin API confirmed the code exists, and its response returns the REDUCTION_INVALID_CODE error.
  • 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 applyDiscountCodeChange again 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

  1. Did anything change between 2025-07 and 2026-07 (or 2025-10 / 2026-01 / 2026-04) in how applyDiscountCodeChange / applyGiftCardChange look up codes?
  2. 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?
  3. 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?
  4. What’s the recommended pattern for applying a code that the extension just created?

Thanks for the detailed report. We’ve checked, and nothing changed between 2025-07 and 2026-07 in how applyDiscountCodeChange or applyGiftCardChange validate codes, so we’d like to look at specific occurrences rather than just the API version. Could you share:

  1. The store’s .myshopify.com domain,
  2. One or two affected checkout tokens with the UTC time of the failed apply,
  3. The exact startsAt value your backend sends in discountCodeBasicCreate
  4. A HAR (or network log) of a retry that you believe sends no Proposal request.

With that information, we can trace the exact requests on our side and follow up here.