# Ability to remove discount code

**URL:** <https://community.shopify.dev/t/ability-to-remove-discount-code/6017>\
**Category:** Extensions\
**Tags:** pos-extensions\
**Created:** [January 14, 2025, 9:55pm UTC](https://community.shopify.dev/t/ability-to-remove-discount-code/6017 "2025-01-14T21:55:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dfmcphee](https://sea1.discourse-cdn.com/shopifycommunity/user_avatar/community.shopify.dev/dfmcphee/32/3063_2.png) [@dfmcphee](https://community.shopify.dev/u/dfmcphee)\
**Post date:** [January 14, 2025, 9:55pm UTC](https://community.shopify.dev/t/ability-to-remove-discount-code/6017/1 "2025-01-14T21:55:07Z")

</div>

There does not seem to be a way to remove discounts by code in a POS extension, you can only add them.

We would like to allow merchants to add or remove discounts they have but currently the only way we can make this work is by clearing all discounts and re-adding again.

---

<div class="post-metadata">

**Author:** ![Victor\_Chu](https://sea1.discourse-cdn.com/shopifycommunity/user_avatar/community.shopify.dev/victor_chu/32/3065_2.png) [@Victor\_Chu](https://community.shopify.dev/u/Victor_Chu)\
**Post date:** [January 14, 2025, 10:44pm UTC](https://community.shopify.dev/t/ability-to-remove-discount-code/6017/2 "2025-01-14T22:44:04Z")

</div>

I just want to be sure but you are calling [removeCartDiscount()](https://shopify.dev/docs/api/pos-ui-extensions/unstable/apis/cart-api#cartapi-propertydetail-removecartdiscount)? I believe that should clear the first available cart code discount in the cart, or do you require the ability to clear specific / multiple cart code discounts?

---

<div class="post-metadata">

**Author:** ![dfmcphee](https://sea1.discourse-cdn.com/shopifycommunity/user_avatar/community.shopify.dev/dfmcphee/32/3063_2.png) [@dfmcphee](https://community.shopify.dev/u/dfmcphee)\
**Post date:** [January 15, 2025, 2:17pm UTC](https://community.shopify.dev/t/ability-to-remove-discount-code/6017/3 "2025-01-15T14:17:23Z")

</div>

Yes, exactly. We have a flow where we want a merchant to be able to toggle specific discounts on and off. If we could use `removeCartDiscount` with a specific code to remove, that would be great.

---

<div class="post-metadata">

**Author:** ![Victor\_Chu](https://sea1.discourse-cdn.com/shopifycommunity/user_avatar/community.shopify.dev/victor_chu/32/3065_2.png) [@Victor\_Chu](https://community.shopify.dev/u/Victor_Chu)\
**Post date:** [January 20, 2025, 10:36pm UTC](https://community.shopify.dev/t/ability-to-remove-discount-code/6017/4 "2025-01-20T22:36:37Z")

</div>

I understand, thanks for the suggestion. We will add it to our feature requests.
