Beta Release
This is pre-release documentation for an API in public beta and is subject to change.

Loyalty API Example Walkthrough 1

In this walkthrough you use the Orders API to create orders and use the Loyalty API to apply loyalty discounts to the order, compute loyalty points for the purchase, and add those points to the buyer's account. You can also use your own order processing system. However if you use the Orders API, as this exercise shows, the integration of the Loyalty API with the Orders API reduces the application development time and complexity.

In the walkthrough, you first set up a loyalty program with the following accrual rule and reward tier in the Seller Dashboard:

  • Accrual rule. Configure a spend-based accrual rule: "Earn one point for each dollar spent".

  • Reward tier. Offer a discount on the entire sale: "Ten points earn 10% off your total purchase".

After setting up the program in the Seller Dashboard, you explore the Loyalty API features, such as create a loyalty account for a buyer, add points to the buyer's account, and redeem points for a reward.