Checkout Events

Checkout events indicate various checkout states and conditions. The system maintains fault tolerance by returning events instead of failing operations.

Event Structure

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

Event Enum

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

Last updated