API Reference

Rewards Options

LoyaPro partners are able to provide multiple rewards options, such as:

  • A fixed amount of discount on the total order
    • Example: 15 SAR deducted from subtotal
  • A percentage discount on total order
    • Example: 15% applied on subtotal
  • A fixed amount deducted from selected products
    • Example: If a meal price is 30 SAR and the fixed discount amount is 5 SAR then the total for the selected mean is 25 SAR
  • A percentage amount applied on selected products
    • Example: 100% on cafe latte meaning that the whole price of cafe latte is discounted and the customer is able to get it for free
reward redemption flow

Redemption process

Redemption Process

The redemption process is done in 3 steps and 2 Simple API calls.

 Check Reward

The first Step is when the cashier adds the customer to the order and starts the redemption process. The POS should start the process by showing an input field for the cashier to insert the redemption code provided by the customer. Once it's inserted the cashier will click on Validate/ Check Rewards

 Reward API

When the cashier clicks on Validate / Check Reward the first api call will be triggered

WebhookMethod
https://loyapro.com/pos/1.0.0/{pos_name}/rewardPOST

Reward API Request should include:

  1. POS Business/Merchant Reference or Identifier (Example: 9512322)
  2. Customer National Phone Number (Example: 551231212)
  3. Customer Country Code (Example: for Saudi Arabia 966)
  4. Reward/Redemption Code (Example: S5923RT21)
{
  "business_reference": "9512322"
  "customer_name": "Tariq Ali",
  "customer_mobile_number": "548548545",
  "mobile_country_code": 966,
  "reward_code": "24564955"
}

 Reward API response will include:

  1. POS Business Reference or Identifier
  2. Redemption Code (Provided by the customer & inserted by the cashier)
  3. Customer Reference or Identifier
  4. Customer Phone Number
  5. Discount Type
    1. Order based (Hint: look at Rewards Option 3 & 4)
    2. Products based (Hint: look at Rewards Option 1 & 2)
  6. Is Percentage (Indicating the discount is a fixed amount or a percentage discount)
  7. Maximum Discount Allowed
  8. Products Allowed
  9. Quantity
{
	"type": 2,
	"discount_amount": 100,
	"is_percent": true,
	"customer_mobile_number": "582816297",
	"mobile_country_code": "SA",
	"reward_code": "335445",
	"business_reference": "644722",
	"max_discount_amount": 1000,
	"allowed_products": {
		"quantity": 1,
		"products_list": [
			"9327dac3-db63-42a5-afff-bcacd7536125",
			"948bfe84-6aef-4f82-95ab-1bf9528ba666",
			"9501d8a2-816d-4e8a-a2b0-6e01708ca228",
			"9554eb8d-4424-4620-a430-1dbfcabd8a2d",
			"961e7f39-0c2f-471d-a8ae-ed04b48bb9e5",
			"925a0e7e-31dd-472a-8dd9-af9567625f06",
			"_74g399a4",
			"_7g26gg9a",
			"_78851123",
			"_792d9a92"
		]
	}
}

Redeem Reward

Once the system receives the response from LoyaPro the cashier will be able to confirm the customer reward. To confirm the customer reward the POS should provide a Redeem Button. The cashier then will be able selects the customer reward and clicks Redeem

Redeem API

When the cashier clicks on Redeem the second API will be called

WebhookMethod
https://loyapro.com/pos/1.0.0/{pos_name}/redeemPOST

Redeem API Request should include:

  1. POS Business/Merchant Reference or Identifier (Example: 9512322)
  2. Date & Time of event
  3. Branch Reference or Identifier
  4. Customer National Phone Number (Example: 551231212)
  5. Customer Country Code (Example: for Saudi Arabia 966)
  6. Reward/Redemption Code (Example: S5923RT21)
  7. Redemption Details that includes an array of selected products and quantity (Only if rewards is for selected products)
    1. Products Identifier
    2. Quantity

 Redeem API Response:

Empty with Status 200