Skip to main content
The shop metafield contains your full loyalty program configuration. Access it in Liquid at:
{{ shop.metafields.mage.loyalty.value }}
Since the metafield type is json, you access nested properties through .value in Liquid.

Full object shape

{
  "points_program": {
    "enabled": true,
    "ways_to_earn": [
      {
        "name": "Place an order",
        "description": "Earn points for every dollar you spend",
        "points": 5,
        "type": "purchase",
        "category": "orders",
        "is_active": true,
        "customer_facing_label": "5 points per $1 spent",
        "call_to_action_url": null
      }
    ],
    "points_rewards": [
      {
        "name": "$5 Off",
        "points_cost": 500,
        "discount_type": "fixed",
        "discount_amount": 5.0,
        "minimum_spend": null,
        "is_active": true
      }
    ],
    "points_expiry_enabled": false,
    "points_expiry_days": null
  },
  "vip_program": {
    "enabled": true,
    "multiplier_mode": "multiplier",
    "tiers": [
      {
        "name": "Silver",
        "points_required": 0,
        "multiplier": 1.0,
        "badge_color": "#C0C0C0",
        "badge_image_url": null,
        "description": "Welcome to the program"
      },
      {
        "name": "Gold",
        "points_required": 1000,
        "multiplier": 1.5,
        "badge_color": "#FFD700",
        "badge_image_url": null,
        "description": "Earn 1.5x points on every purchase"
      }
    ]
  },
  "referral_program": {
    "enabled": true,
    "referral_rewards": [
      {
        "name": "10% Off for your friend",
        "discount_type": "percentage",
        "reward_type": "referred_customer"
      },
      {
        "name": "200 bonus points",
        "discount_type": "points",
        "reward_type": "referring_customer"
      }
    ],
    "social_settings": {
      "twitter": true,
      "facebook": true,
      "email": true,
      "whatsapp": false
    },
    "customer_account_required": false
  }
}

Field reference

points_program

FieldTypeDescription
enabledbooleanWhether the points program is active
ways_to_earnarrayList of earning rules
points_rewardsarrayList of rewards available for redemption
points_expiry_enabledbooleanWhether points expire
points_expiry_daysnumber | nullDays until points expire (null if disabled)

points_program.ways_to_earn[]

FieldTypeDescription
namestringEarning rule name
descriptionstring | nullOptional description
pointsnumberPoints awarded
typestringRule type (e.g. purchase, signup, birthday, review)
categorystring | nullRule category
is_activebooleanWhether the rule is currently active
customer_facing_labelstring | nullDisplay label for customers
call_to_action_urlstring | nullOptional URL for social/action rules

points_program.points_rewards[]

FieldTypeDescription
namestringReward name
points_costnumberPoints required to redeem
discount_typestringDiscount type (fixed, percentage, free_shipping, free_product)
discount_amountnumber | nullDiscount value (null for free shipping/product)
minimum_spendnumber | nullMinimum order amount required
is_activebooleanWhether the reward is currently active

vip_program

FieldTypeDescription
enabledbooleanWhether the VIP program is active
multiplier_modestring | nullHow multipliers are applied
tiersarrayList of VIP tiers (sorted by points required, ascending)

vip_program.tiers[]

FieldTypeDescription
namestringTier name
points_requirednumberLifetime points needed to reach this tier
multipliernumberPoints earning multiplier (e.g. 1.5 = 1.5x points)
badge_colorstring | nullHex color for the tier badge
badge_image_urlstring | nullCustom badge image URL
descriptionstring | nullTier description

referral_program

FieldTypeDescription
enabledbooleanWhether the referral program is active
referral_rewardsarrayRewards offered for referrals
social_settingsobjectWhich sharing channels are enabled
customer_account_requiredbooleanWhether referred friends must create an account

referral_program.referral_rewards[]

FieldTypeDescription
namestringReward name
discount_typestringType of discount (percentage, fixed, points, free_shipping, free_product)
reward_typestringWho receives it (referring_customer or referred_customer)

referral_program.social_settings

FieldTypeDescription
twitterbooleanTwitter/X sharing enabled
facebookbooleanFacebook sharing enabled
emailbooleanEmail sharing enabled
whatsappbooleanWhatsApp sharing enabled