Skip to main content
Anchor to DiscountCodeDeletePayload

DiscountCodeDeletePayload

payload

Return type for discountCodeDelete mutation.

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?

Anchor to Mutations with this payloadMutations with this payload

•mutation

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.


Was this section helpful?