Skip to main content
Anchor to discountCodeDeactivate

discountCodeDeactivate

mutation

Requires Apps must have write_discounts access scope.

Temporarily suspends a code discount without permanently removing it from the store. Deactivation allows merchants to pause promotional campaigns while preserving the discount configuration for potential future use.

For example, when a flash sale needs to end immediately or a discount code requires temporary suspension due to inventory issues, merchants can deactivate it to stop new redemptions while keeping the discount structure intact.

Use DiscountCodeDeactivate to:

  • Pause active promotional campaigns timely
  • Temporarily suspend problematic discount codes
  • Control discount availability during inventory shortages
  • Maintain discount history while stopping usage

Deactivated discounts remain in the system and can be reactivated later, unlike deletion which persistently removes the code. Customers attempting to use deactivated codes will receive appropriate error messages.

•ID!
required

The ID of the code discount to deactivate.


Was this section helpful?

Anchor to DiscountCodeDeactivatePayload returnsDiscountCodeDeactivatePayload returns

•DiscountCodeNode

The deactivated code discount.

•[DiscountUserError!]!
non-null

The list of errors that occurred from executing the mutation.


Was this section helpful?