Revoke Loyalty Points
Remove points from a user's loyalty pass. This function can trigger tier downgrades if the user's points fall below their current tier threshold.
Overview
The revokeLoyaltyPoints
function removes a specified number of points from a user's loyalty pass and automatically recalculates their tier status.
import { revokeLoyaltyPoints } from '@verxioprotocol/core' const result = await revokeLoyaltyPoints(context, { passAddress: publicKey('USER_PASS_ADDRESS'), pointsToRevoke: 100, signer: programAuthority })
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
passAddress | PublicKey | ✅ | The loyalty pass address to revoke points from |
pointsToRevoke | number | ✅ | Number of points to remove (must be positive) |
signer | Signer | ✅ | Program authority required for revoking points |
Use Cases
⚠️ Refunds
Remove points when users return purchases or cancel orders
🔄 Corrections
Fix incorrectly awarded points due to system errors
🚫 Violations
Penalize users for policy violations or abuse