onLoyaltyRewardClaimed

Purpose

Triggered when a player claims a loyalty reward. Use this hook to play celebration sounds and show reward information.

When It Triggers

  • Player redeems points for a reward

  • Server confirms the reward was successfully claimed

Parameters

Parameter
Type
Description

data.shopId

string

Unique shop identifier

data.shopName

string

Display name of the shop

data.rewardId

string

Reward identifier

data.rewardName

string

Reward display name

data.rewardType

string

Type of reward ('coupon', 'item', etc.)

data.pointsCost

number

Points spent

data.previousPoints

number

Points before claim

data.remainingPoints

number

Points after claim

data.couponCode

string

Generated coupon code (if applicable)

Example

Last updated