Liquid API
loyalty_points
Access the current available points balance for a logged-in customer.
Syntax
customer.metafields.lantern.loyalty_pointsDescription
The loyalty_points metafield contains the customer's current available points balance. This value represents points that can be redeemed for rewards and is automatically updated when points are earned, spent, or adjusted.
Properties
Type: Number
Namespace: lantern
Auto-updated: Yes
Return Values
| Scenario | Value | Type |
|---|---|---|
| Logged in with points | Points balance (e.g., 1250) | Number |
| Logged in without points | 0 | Number |
| Not eligible for loyalty | null | null |
| Logged out | null | null |
Examples
Basic Points Display
{% assign points = customer.metafields.lantern.loyalty_points %}
{% if points != nil %}
<div class="loyalty-points">
<span class="points-value">{{ points }}</span>
<span class="points-label">points available</span>
</div>
{% endif %}