> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stackfront.digital/llms.txt
> Use this file to discover all available pages before exploring further.

# Loyalty & Referrals Overview

# Loyalty & Referrals

The SDK provides access to the Stackfront loyalty and referral program via the REST API. Points, tiers, transactions, referrals, and redemptions are all managed server-side.

## Quick Reference

| Hook                     | Purpose                                         |
| ------------------------ | ----------------------------------------------- |
| `useLoyalty(customerId)` | Points balance, tiers, transactions, redemption |

## Service Methods

The `LoyaltyService` exposes:

* `getAccount(customerId, customerEmail?)` — points, tier, progress
* `getTransactions(customerId, page, pageSize)` — point history
* `redeem({ customerId, pointsToRedeem, orderTotal })` — spend points
* `getReferral(customerId)` — referral code and stats
* `trackReferral({ referralCode, referredCustomerId, orderId })` — log a referral
