Installation on Magento 2

Magento editionMinimum compatible version
Magento 2 Community2.1
Magento 2 Enterprise2.1

 Understanding the LoyaltyLion module

The LoyaltyLion module for Magento 2 has three primary responsibilities:

  • We add a single frontend block to your layout, which loads the LoyaltyLion SDK to provide customer UI
  • We add observers to your order and customer lifecycle, to keep LoyaltyLion in sync as this data changes
  • We use your REST API (rooted at <>/rest/V1) to retrieve store configuration and manage price rules
We don't modify your database schema, add cron jobs, or modify customer data within your database. This minimises the risk of incompatibility between LoyaltyLion and other modules.

Installing LoyaltyLion for Magento 2

This part of the guide will walk you through installing LoyaltyLion on your website.

Installing Magento modules is a complex process. We recommend giving these instructions to the person responsible for maintaining your Magento setup rather than attempting to install the module yourself.

Add our repository to your composer.json

In your project’s composer.json, find the top level key repositories (or add one if it doesn’t yet exist). Add an entry for the LoyaltyLion package as shown below:

  "name": "My Magento Store",
  "require": {
    "magento/project-community-edition": "*"
  "repositories": [
      "type": "package",
      "package": {
        "name": "loyaltylion/core",
        "description": "LoyaltyLion - Loyalty Program",
        "type": "magento2-module",
        "version": "1.2.2",
        "autoload": {
          "psr-4": {
            "Loyaltylion\\Core\\": ""
          "files": ["registration.php"]
        "dist": {
          "type": "zip",
          "url": "",
          "reference": "master"

Install the module with composer and the magento CLI tools.

In your Magento project directory:

composer require loyaltylion/core:1.2.2
magento setup:upgrade

Configure the LoyaltyLion module

This part of the guide will walk you through configuring the LoyaltyLion module for your store.

Your Loyalty Program will be completely hidden from your customers until you choose to launch using the button on the LoyaltyLion admin dashboard.

First, find the LoyaltyLion configuration section at StoresConfigurationCustomersLoyaltyLion:

configuration loyaltylion

Next, you need to pick your configuration scope. Pick the website you wish to set up a Loyalty Program for. LoyaltyLion will not be visible or active for customers on other websites hosted on the same Magento server.

choose scope

Next, you need to enter your LoyaltyLion secret and token. You can find these by referring to your setup page.

Each token-secret pairing may only be used once. If you wish to install LoyaltyLion on multiple websites, then you will need a secondary program. Please email if you wish to add one.

enter token secret

Don’t forget to save your configuration!

save configuration

Provide API access

LoyaltyLion needs access to your store API in order to manage Price Rules and retrieve store configuration.

First, make sure that you’re logged into your LoyaltyLion account.

Head to SystemIntegrations:

system integrations

Hit Activate on the LoyaltyLion integration and follow the prompts through to completion:

activate integration

Validate your installation

You can now return to the setup page and check to see if LoyaltyLion was installed correctly.