Skip to content

Remove Coupon ​

Remove an applied coupon code from the cart.

Authentication ​

This mutation supports both authenticated customers and guest users:

  • Authenticated customers: Provide a valid customer authentication token in the Authorization header. Obtain this token via the Customer Login API.
  • Guest users: Provide the Guest Cart Token cartToken obtained from the Create Cart mutation.
Authorization: Bearer <accessToken>

Response ​

FieldTypeDescription
createRemoveCouponCartUpdated cart without coupon
messageStringSuccess or error message
successBooleanRemoval success status

Cart Response Fields ​

FieldTypeDescription
idStringCart ID
couponCodeStringCoupon code (null if removed)
discountAmountFloatDiscount amount (0 if removed)
grandTotalFloatCart total without discount
discountAmountFloatDiscounted amount

Behavior ​

  • Removes the applied coupon from the cart
  • Recalculates cart totals
  • Discount is no longer applied
  • Cart becomes valid again without coupon requirement

Error Responses ​

json
{
  "errors": {
    "cartId": ["Cart not found."],
    "coupon": ["No coupon is currently applied to this cart."]
  }
}

Released under the MIT License.