# Coupons

Source: https://developers.swell.is/frontend-api/coupons

**Swell.js:**

Methods to apply and remove coupon codes from the cart.

### Apply a coupon

Use to apply one coupon per cart. Codes are not case-sensitive.

Returns the updated cart object if the code is valid. Otherwise, it returns a validation error.

**Apply a coupon**

**swell.js**

```javascript
await swell.cart.applyCoupon('SUMMERTIME')
```

### Remove coupon

Use to remove the coupon code from the cart, if one was applied.

**Remove a coupon**

**swell.js**

```javascript
await swell.cart.removeCoupon()
```

**GraphQL:**

Methods to apply and remove coupon codes from the cart.

### Apply a coupon

Use to apply one coupon per cart. Coupon codes are not case-sensitive. Returns the updated cart object if the discount code is valid. Otherwise, returns a validation error.

The parameters for this query are `code` (required), `_locale`, and `_currency`.

**Apply a coupon**

**GraphQL**

```graphql
mutation {
  applyCoupon(code: "SAVE10") {
    accountId
    grandTotal
    couponId
    couponCode
  }
}
```

### Remove a coupon

Use to remove a coupon from an account order. Returns the updated cart object.

The parameters for this mutation are `_locale`, and `_currency`.

**Remove a coupon**

**GraphQL**

```graphql
mutation {
  removeCoupon {
    accountId
    grandTotal
    couponId
    couponCode
  }
}
```
