Skip to main content
mutation

Requires Apps must have write_discounts access scope.

Removes a code discount from the store, making it permanently unavailable for customer use. This mutation provides a clean way to eliminate discount codes that are no longer needed or have been replaced.

For example, when a seasonal promotion ends or a discount code has been compromised, merchants can delete it entirely rather than just deactivating it, ensuring customers cannot attempt to use expired promotional codes.

Use DiscountCodeDelete to:

  • persistently remove outdated promotional codes
  • Clean up discount code lists after campaigns end
  • Eliminate compromised or leaked discount codes
  • Maintain organized discount management

Once deleted, the discount code cannot be recovered and any customer attempts to use it will fail. This differs from deactivation, which preserves the code for potential future reactivation.

ID!
required

The ID of the code discount to delete.


Was this section helpful?

Anchor to DiscountCodeDeletePayload returnsDiscountCodeDeletePayload returns

Anchor to deletedCodeDiscountIddeletedCodeDiscountId
ID

The ID of the code discount that was deleted.

[DiscountUserError!]!
non-null

The list of errors that occurred from executing the mutation.


Was this section helpful?