Skip to main content
square.onLoyaltyEventCreated subscribes to loyalty.event.created for the selected seller. It requires LOYALTY_READ.

Example

automations/square-on-loyalty-event-created.automation.ts

Event

A balance-changing event occurred. Square Loyalty maintains a ledger of events that occur over the lifetime of a loyalty account. Square publishes notifications for each loyalty event logged to the ledger. These loyalty events are immutable, which means they are never updated or deleted. For example, when a buyer redeems a reward and then returns the order, Square publishes separate notifications for the corresponding CREATE_REWARD and DELETE_REWARD events. Similarly, Square publishes a notification for the OTHER event when points are deducted after a purchase that accrued points is refunded. The signal resolves to the official Square.LoyaltyEventCreatedEvent payload with type narrowed to loyalty.event.created.