Verxio Protocol

Gift Loyalty Points

Award bonus points to users for special occasions, promotions, or custom actions. Gift points with a custom reason that gets tracked in the user's activity history.

Overview

The giftLoyaltyPoints function allows you to award points to users with a custom action reason, perfect for special promotions, bonuses, or manual rewards.

import { giftLoyaltyPoints } from '@verxioprotocol/core'

const result = await giftLoyaltyPoints(context, {
  passAddress: publicKey('USER_PASS_ADDRESS'),
  pointsToGift: 500,
  signer: updateAuthority,
  action: 'birthday_bonus'  // Custom action name
})

Parameters

ParameterTypeRequiredDescription
passAddressPublicKeyThe loyalty pass address to gift points to
pointsToGiftnumberNumber of points to gift (must be positive)
signerSignerProgram authority required for gifting points
actionstringCustom reason for gifting (e.g., 'bonus', 'promotion')

Common Gift Scenarios

🎂 Birthday Bonus

Special points for user birthdays

action: 'birthday_bonus'

🎉 Welcome Gift

Welcome bonus for new users

action: 'welcome_gift'

🏆 Achievement

Reward for reaching milestones

action: 'achievement'

💝 Holiday Bonus

Seasonal promotions and holidays

action: 'holiday_bonus'