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

    Unlock Real‑Time Insights: App Events Now Available in Admin UI Extensions & Embedded Apps

    Unlock Real‑Time Insights: App Events Now Available in Admin UI Extensions & Embedded Apps

    Shopify’s latest update lets Admin UI extensions and embedded apps emit app events directly from the admin, without tokens. Learn what changed, who it impacts, and how to start sending events today.

    November 18, 20264 min
    Admin‑Created Custom Apps Now Live in the Shopify Dev Dashboard

    Admin‑Created Custom Apps Now Live in the Shopify Dev Dashboard

    Shopify now surfaces custom apps built in the admin inside the Dev Dashboard, giving developers centralized credential control, IP allowlisting, and full API/webhook logs. Learn what changed, who’s affected, and how to secure and monitor your apps today.

    November 17, 20265 min
    Custom Apps From the Admin Now Live in the Dev Dashboard – What You Need to Know

    Custom Apps From the Admin Now Live in the Dev Dashboard – What You Need to Know

    Legacy custom apps created in the Shopify admin are now visible in the Dev Dashboard, giving merchants and developers richer security controls, IP restrictions, and activity logs. Learn what changed, who’s impacted, and how to migrate your apps today.

    November 17, 20265 min
    Amazon EventBridge Webhook Payloads Now Up to 1 MB – What It Means for Your Shopify Apps

    Amazon EventBridge Webhook Payloads Now Up to 1 MB – What It Means for Your Shopify Apps

    Shopify increased the Amazon EventBridge webhook payload limit from 256 KB to 1 MB, letting developers receive larger product and order data inline. Learn who is affected, how it works, and what steps to take now.

    November 17, 20265 min