Issue with discountCodeFreeShippingCreate mutation (API version 2025-07)

Hey!

When I try to use the mutation discountCodeFreeShippingCreate (API version 2025-07), I encounter the following issue:

Request:

ShopifyFreeShippingDiscountCodeCreateRequest(query=mutation discountCodeFreeShippingCreate(
  $freeShippingCodeDiscount: DiscountCodeFreeShippingInput!
) {
  discountCodeFreeShippingCreate(
    freeShippingCodeDiscount: $freeShippingCodeDiscount
  ) {
    codeDiscountNode {
      id
    }
    userErrors {
      field
      code
      message
    }
  }
}
, variables=ShopifyFreeShippingDiscountCodeVariables(freeShippingCodeDiscount=ShopifyFreeShippingCodeDiscount(appliesOncePerCustomer=false, appliesOnOneTimePurchase=true, appliesOnSubscription=false, code=RFSHIP2025, combinesWith=ShopifyDiscountCodeCombinesWith(productDiscounts=true, orderDiscounts=true, shippingDiscounts=true), customerSelection=ShopifyDiscountCodeCustomerSelection(all=true, customers=null, customerSegments=null), destination=ShopifyFreeShippingDestination(all=true, countries=null), endsAt=2026-09-09T16:29:51.696342-04:00[America/New_York], maximumShippingPrice=null, minimumRequirement=null, recurringCycleLimit=null, startsAt=2025-09-09T16:29:51.696342-04:00[America/New_York], title=Test, usageLimit=1)))

Response:

{
  "discountCodeFreeShippingCreate": {
    "codeDiscountNode": null,
    "userErrors": [
      {
        "field": [
          "freeShippingCodeDiscount",
          "appliesOnSubscription"
        ],
        "code": "INVALID",
        "message": "applies_on_subscription field is not permitted without the shop using subscriptions."
      },
      {
        "field": [
          "freeShippingCodeDiscount",
          "appliesOnOneTimePurchase"
        ],
        "code": "INVALID",
        "message": "applies_on_one_time_purchase field is not permitted without the shop using subscriptions."
      }
    ]
  }
}

Thanks in advance for your help!

Same issue with API Version 2025-10

Hey @RapFame_Shop, if you remove the appliesOnSubscription=false from your variables does it work?

Just removed these two properties (not set false, but remove overall) and everything start working, thank you!

Glad that helped! Welcome to the dev community as well :slight_smile:

Thank you for the warm welcome! :sweat_smile: