Draft Orders Now Require the Apply Discounts Permission – What Developers Need to Know

Shopify’s latest API change blocks draftOrderCreate and draftOrderUpdate from adding discounts unless the staff member has the apply_discounts_to_draft_orders permission. Learn what changed, who’s impacted, and how to update your app today.

Draft Orders Now Require the Apply Discounts Permission – What Developers Need to Know
6 sections

Shopify has tightened security around draft orders. Starting now, any attempt to add a discount code or enable automatic discounts via the draftOrderCreate or draftOrderUpdate mutations will fail with an ACCESS_DENIED error unless the staff member executing the request holds the apply_discounts_to_draft_orders permission. This post breaks down the change, who it affects, and the exact steps you need to take to keep your app running smoothly.

What Changed

In all supported API versions, the GraphQL mutations draftOrderCreate and draftOrderUpdate now check for the apply_discounts_to_draft_orders permission before accepting any discount‑related fields in DraftOrderInput. If the staff member lacks this permission, the mutation returns a top‑level error with the code ACCESS_DENIED and a null payload. Importantly, this error is not included in the userErrors array, so apps that only inspect userErrors won’t see the failure.

The following actions trigger the permission check:

• Adding a new discount code to discountCodes that isn’t already attached to the draft order

• Setting acceptAutomaticDiscounts to true when the draft order didn’t already accept automatic discounts

For draftOrderCreate, any non‑empty discountCodes array or acceptAutomaticDiscounts:true counts as “adding a discount” because the order is being created from scratch.

Who Is Affected

The change only impacts apps that:

  • Call draftOrderCreate or draftOrderUpdate while impersonating a staff member (OAuth token tied to a staff user).2. Attempt to add or enable discounts as part of that request.
  • If your app uses an offline access token, a private app credential, or never touches discount fields, you’re safe. The restriction is purely about staff‑member scoped requests that lack the new permission.

    Example of the New Error Response

    Here’s a typical mutation that tries to add a discount code and turn on automatic discounts:

    mutation draftOrderUpdate($id: ID!, $input: DraftOrderInput!) {

    draftOrderUpdate(id: $id, input: $input) {

    draftOrder {

    id

    discountCodes

    acceptAutomaticDiscounts

    }

    userErrors {

    field

    message

    }

    }

    }

    With variables:

    {

    "id": "gid://shopify/DraftOrder/276395349",

    "input": {

    "discountCodes": ["SUMMER10"],

    "acceptAutomaticDiscounts": true

    }

    }

    If the staff user lacks apply_discounts_to_draft_orders, Shopify returns:

    {

    "errors": [

    {

    "message": "Access denied for draftOrderUpdate field. Required access: write_draft_orders access scope. Also: The user must have access to manage draft orders.",

    "locations": [{"line": 2, "column": 3}],

    "path": ["draftOrderUpdate"],

    "extensions": {

    "code": "ACCESS_DENIED",

    "documentation": "https://shopify.dev/api/usage/access-scopes",

    "requiredAccess": "write_draft_orders access scope. Also: The user must have access to manage draft orders."

    }

    }

    ],

    "data": {

    "draftOrderUpdate": null

    }

    }

    What You Need to Do

  • Update Error Handling – Inspect the top‑level errors array for ACCESS_DENIED instead of relying solely on userErrors. A simple guard can look like:
  • if (response.errors?.some(e => e.extensions?.code === 'ACCESS_DENIED')) {

    // Handle missing permission – maybe show a UI prompt

    }

  • Ask Merchants for the New Permission – The staff member who runs the mutation must have the “Apply discounts” permission under Draft orders. In the Shopify admin, go to Settings → Users and permissions, select the staff user, and enable Apply discounts to draft orders.
  • Document the Requirement – Update your app’s onboarding docs and OAuth scopes screen to mention that the apply_discounts_to_draft_orders permission is required for any feature that creates or updates draft orders with discounts.
  • Test Across API Versions – The restriction is enforced in every supported version, so run your integration tests against the latest stable version (e.g., 2024‑07) to confirm the behavior.
  • Quick Checklist for Developers

  • ✅ Verify that the staff token you use has the apply_discounts_to_draft_orders permission.
  • ✅ Add top‑level error handling for ACCESS_DENIED.
  • ✅ Update your UI to guide merchants in granting the new permission.
  • ✅ Re‑run automated tests for draft order creation and updates.
  • ✅ Communicate the change in your changelog or release notes.
  • Conclusion & Next Steps

    Shopify’s new permission requirement tightens control over discount abuse while still giving apps the flexibility they need—provided they ask for the right access. By adjusting error handling and prompting merchants to enable the Apply discounts permission, you’ll keep your draft‑order workflows reliable and compliant. Need help updating your integration? Reach out to our developer support team or drop a comment below—we’re happy to walk you through the changes.

    Tags
    Sources

    Related Articles

    Why Network Access Declarations Are Now Mandatory for Online Store Apps

    Why Network Access Declarations Are Now Mandatory for Online Store Apps

    Shopify now requires apps that run on the online store to declare their network access in shopify.app.toml. Learn what changed, who’s affected, and how to update your app before the December 2026 deadline.

    November 19, 20264 min
    Understanding the New applyResult Field in RolloutChange: What Developers Need to Know

    Understanding the New applyResult Field in RolloutChange: What Developers Need to Know

    Shopify’s GraphQL Admin API now returns an applyResult field on RolloutChange, letting apps track rollout outcomes in real time. Learn what changed, who it affects, and how to update your code to handle success, failure, and in‑progress states.

    November 19, 20264 min

    November 19, 20261 min
    Store Credit Now Powers Shopify Subscriptions with allowStoreCredit

    Store Credit Now Powers Shopify Subscriptions with allowStoreCredit

    Shopify’s 2027-01 API adds store‑credit support to subscriptions via the allowStoreCredit flag. Learn what changed, who’s impacted, and how developers can enable this new feature in minutes.

    November 19, 20265 min