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

# Tiers

> How loyalty tiers work: XP thresholds, the stable string tier ID your backend receives on webhooks, per-tier earn rates, and how tier changes are reported on purchase and refund.

A tier is a named progression level. A player enters a tier when their Loyalty XP crosses the tier's threshold, and holds it as long as their balance stays at or above that threshold. Higher tiers carry more generous earn rates.

## Tier IDs

Every tier has a stable string tier ID, set in Studio. This ID is what your backend receives in the loyalty webhook payload; `currentTierId`, `previousTierId`, and `milestoneTierId` all carry it.

> [!WARNING]
>
> Key your logic on the string tier ID, never on the display name. Display names are editable after publish and are localized for players; the tier ID is stable for the life of the campaign.

## Thresholds and progression

* The first tier must start at `0` XP, so every player begins in a tier.
* Thresholds are unique and ascending. A player's tier is the highest tier whose threshold their XP has reached.
* XP is cumulative within a campaign. Reaching a higher tier does not reset the balance.

Because tier is derived from the XP balance, it moves in both directions. A purchase can move a player up a tier; a [refund](https://docs.stash.gg/guides/stash-webshop/how-tos/loyalty/refunds-and-xp.md) can move them back down when the proportional XP debit drops the balance below a threshold.

## Earn rates

Each tier defines an earn rate per USD of webshop spend, for one or more [reward types](https://docs.stash.gg/guides/stash-webshop/how-tos/loyalty/reward-types.md). Earn rates are applied automatically at checkout, using the tier the player is in at the time of purchase.

For example, a Silver tier might grant `10 XP + 5 coins per $1`, while Gold grants `20 XP + 10 coins per $1`. A player in Silver earns at Silver rates for that transaction, even if the purchase pushes them into Gold.

## Effective points multiplier

The loyalty snapshot reports `pointsMultiplierPermille`: how much faster the player's current tier earns Loyalty XP per USD than the base tier. It is the ratio of the current tier's XP earn rate to the XP earn rate of the base (first, lowest) tier, encoded as an **integer in permille** (thousandths). Divide by 1000 to get the multiplier: `1500` is 1.5x.

* The base tier is its own reference, so its value is exactly `1000` (1x).
* A tier whose XP earn rate is double the base tier's reports `2000`, triple reports `3000`, and so on.

Given the earn rates above (Bronze `5 XP`, Silver `10 XP`, Gold `20 XP` per USD), Bronze is the base tier and reports `1000` (1x), Silver reports `2000` (10 / 5 = 2x), and Gold reports `4000` (20 / 5 = 4x). Use it for tier-relative display and messaging (for example "2x XP at this tier"); it is a derived, display-oriented value, not the XP granted by any single event. The XP change for an event is always the snapshot's `pointsDelta`.

> [!NOTE]
>
> `pointsMultiplierPermille` is always measured against the base tier, not the adjacent lower tier and not the player's own `previousTierId` from the event. It is always present in the loyalty snapshot.

## Tier change reporting

The loyalty webhook payload reports tier transitions explicitly:

* `currentTierId` is always the player's tier after the event applied.
* `previousTierId` is present only when the event changed the player's tier: an upgrade on purchase or a downgrade on refund. When the tier is unchanged, `previousTierId` is omitted.

This lets your backend react to tier changes (for example, unlocking or revoking a tier benefit) without tracking prior state yourself.

## Fields

| Field | Type | Required | Notes |
| - | - | - | - |
| Name | Text | Yes | Display name shown in the loyalty hub. |
| Tier ID | Text | Yes | Stable identifier reported on webhooks. Set once. |
| XP threshold | Number ≥ 0 | Yes | First tier must be 0; thresholds unique. Locked after publish. |
| Earn rates | Number > 0 per reward type | Yes | Reward granted per USD spent. Locked after publish. |
| Icon | Image, 162 x 162 px | Yes | Tier badge in the loyalty hub. |
| Background image | Image, 340 x 162 px | No | Banner behind the tier card. |
| Colour | Hex | No | Tier accent colour. |

XP thresholds and earn rates lock when the program is published; display fields stay editable. See [Configuration](https://docs.stash.gg/guides/stash-webshop/how-tos/loyalty/configuration.md#draft-and-published) for the publish flow.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.