# Checkout Events

### Event Structure

```typescript
interface ICheckoutEvents {
  type: CHECKOUT_EVENT_ENUM;
  message: string;
  items?: Array<Partial<ICheckoutItem>>;
}
```

### Event Enum

```typescript
enum CHECKOUT_EVENT_ENUM {
  ERROR_PROCESSING_GIFT_CARDS = 'ErrorProcessingGiftCards',
  INVALID_GIFT_CARD_CODE = 'InvalidGiftCardCodes',
  INVALID_GIFT_CARD_PARTNER = 'InvalidGiftCardPartner',
  INACTIVE_GIFT_CARD = 'InactiveGiftCard',
  GIFT_CARD_ALREADY_IN_USE = 'GiftCardAlreadyInUse',
  GIFT_CARD_EXPIRED = 'GiftCardExpired',
  GIFT_CARD_BALANCE_DEPLETED = 'GiftCardBalanceDepleted',
  RETAILER_ONDEMAND_HOURS_NOT_AVAILABLE = 'RetailerOnDemandHoursNotAvailable',
  ITEM_QTY_CHANGE = 'ItemQuantityChange',
  MAX_QUANTITY_PER_ORDER_EXCEEDED = 'MaxQuantityPerOrderExceeded',
  RETAILER_DOES_NOT_ALLOW_PROMOS = 'RetailerDoesNotAllowPromos',
  RETAILERS_DO_NOT_ALLOW_PROMOS = 'RetailersDoNotAllowPromos',
  RETAILER_DOES_NOT_ALLOW_GIFT_CARDS = 'RetailerDoesNotAllowGiftCards',
  RETAILERS_DO_NOT_ALLOW_GIFT_CARDS = 'RetailersDoNotAllowGiftCards',
}
```

### Event Types

#### Checkout Modification Events

* `ItemQuantityChange`: Item quantity reduced from ${originalQuantity} to ${stock} due to limited stock availability

#### Validation Events

* `MaxQuantityPerOrderExceeded:` The maximum quantity per order for this item is ${maxPresaleQuantity}. Quantity has been adjusted accordingly. || Quantity adjusted from ${originalQuantity} to ${quantity} due to presale availability
* `RetailerOnDemandHoursNotAvailable:` The following cart item(s) have been removed due to retailer hours of operation restrictions

#### Promo and Gift Cart Event Cases

* `ErrorProcessingGiftCards:`  There's been an error processing your gift card(s)
* `InvalidGiftCardCodes:`  The gift card code(s) you entered is invalid
* `InvalidGiftCardPartner:`  This gift card cannot be used with this merchant
* `InactiveGiftCard:` This gift card is currently inactive
* `GiftCardAlreadyInUse:`  This gift card has already been used
* `GiftCardExpired:`  This gift card has expired
* `GiftCardBalanceDepleted:`  This gift card has no remaining balance
* `RetailerDoesNotAllowPromos:` This retailer does not accept promo codes || None of the selected retailers accept promo codes || ${retailerNames} does not accept promo codes || Promo code applied. Note: ${retailerNames} does not accept promo codes || Promo code applied to eligible items only. The following retailers do not accept promo codes: ${retailerNames}
* `RetailersDoNotAllowPromos:`  Selected retailers do not accept promo codes || None of the selected retailers accept promo codes || ${retailerNames} does not accept promo codes || Promo code applied. Note: ${retailerNames} does not accept promo codes || Promo code applied to eligible items only. The following retailers do not accept promo codes: ${retailerNames}
* `RetailerDoesNotAllowGiftCards:`  Gift card applied. Note: ${retailerNames} does not accept gift cards || Gift card applied to eligible retailers only. The following retailers do not accept gift cards: ${retailerNames}
* `RetailersDoNotAllowGiftCards:`  ${retailerNames} does not accept gift cards || None of the selected retailers accept gift cards


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.liquidcommerce.cloud/events-and-errors/checkout-events.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
