coupon.applied

A code takes money off and is on the cart. A code entered while the cart is empty waits for the cart's first price.

CODE
next.on('coupon.applied', (data, event) => {});

Data

Present: always; optional when it may be missing; campaign once the campaign is loaded; priced once the server priced the cart.

FieldTypePresent
codestringalways
amountnumberoptionalWhat the code takes off, once the cart is priced.
discountsDiscount[]optionalThe cart's discounts that carry this code.

Discount

A discount on the cart's products or on its shipping. Amounts are in the cart's currency.

FieldTypePresent
namestringalwaysThe offer's name.
amountnumberalwaysThe amount taken off.
source"offer" | "coupon"alwayscoupon for a code the shopper entered (it is in coupons); offer for an automatic offer or a bundle card's own code.
codestringoptionalThe code, for a coupon.
offer_idnumberalwaysThe offer that gave it.
percentagenumberoptionalThe percentage the offer is set to take off, as the API reports it, such as 20. Its configured value, for a label such as “20% off”; the amount actually taken off is amount.

Example

The second argument, with data inside. See Events for the envelope's fields.

CODE
{
  "event_id": "3f2b8c1d9e7a4b6c8d5e2f1a0b9c8d7e",
  "event_type": "coupon.applied",
  "object": "coupon",
  "data": {
    "code": "SAVE10",
    "amount": 1,
    "discounts": [
      {
        "name": "SAVE10",
        "amount": 1,
        "source": "coupon",
        "code": "SAVE10",
        "offer_id": 10,
        "percentage": 10
      }
    ]
  },
  "created_at": "2026-11-04T08:30:00.000Z",
  "session_id": "0b8f3c2d1e4a4f6b9c7d5e3f2a1b0c9d",
  "sdk_version": "0.5.0"
}