Introduction

The Loyalty Checkout Exchange API enables you to manage loyalty discounts during the checkout process in your Wix site's eCommerce flow. This API allows you to apply rewards and query discount information, enhancing your loyalty program integration with the checkout process.

With the Loyalty Checkout Exchange API, you can:

  • Apply a discount to checkout to apply a loyalty reward, coupon, or referral reward to a specific checkout. This can include redeeming points for a reward and then applying it, or applying an already redeemed reward.
  • Query loyalty checkout discounts to retrieve and filter information about existing loyalty checkout discounts, including both redeemed rewards ready for immediate use and potential rewards that require point redemption.

For more information about managing your site's loyalty program, see the Loyalty API.

Before you begin

It's important to note the following points before starting to code:

  • You must have the Wix Loyalty Program app installed on your site to use this API.
  • To use the Loyalty Checkout Exchange API, your site must have the Wix Bookings, Wix Stores or Wix Restaurants Orders (New) app.

Loyalty Checkout Exchange API and eCommerce Checkout API

The Loyalty Checkout Exchange API works in conjunction with the eCommerce Checkout API. Here's how they interact:

  1. The eCommerce Checkout API manages the overall checkout process, including items to be purchased, price and tax summaries, shipping and billing info, and applied discounts.
  2. The Loyalty Checkout Exchange API specifically handles loyalty-related discounts within this process.
  3. When a loyalty discount is applied or queried, the Loyalty Checkout Exchange API interacts with the eCommerce Checkout API to update or retrieve the relevant information.
  4. The checkout ID used in the Loyalty Checkout Exchange API comes from the eCommerce Checkout API.

For a complete eCommerce solution, you may need to use both APIs in conjunction. The eCommerce Checkout API provides broader functionality for managing the entire checkout process, while the Loyalty Checkout Exchange API focuses specifically on loyalty program integrations.

Redeemed vs Non-Redeemed Coupons

Redeemed Coupons

  • Points have already been exchanged for these coupons.
  • They can be applied directly at checkout without further point deduction.
  • These coupons are available in the customer's "my-rewards" page.
  • When applied, they have the LOYALTY_COUPON discount type.

Non-Redeemed Coupons

  • Points have not yet been exchanged for these coupons.
  • Customers have the option to redeem these coupons during checkout by exchanging points.
  • When redeemed at checkout, they have the COUPON_REWARD discount type.
  • Points are deducted from the customer's total when these coupons are redeemed during checkout.

Relationship between rewards and discount types

  1. Flexible rewards always correspond to the DISCOUNT_AMOUNT discount type when applied at checkout.
  2. Fixed rewards can result in either:
    • COUPON_REWARD discount type if redeemed during the checkout process.
    • LOYALTY_COUPON discount type if redeemed before checkout and then applied.
  3. Referral rewards correspond to the REFERRAL_REWARD discount type when applied at checkout.

This relationship ensures that the system can track both the type of reward being used and how it's being applied during the checkout process, allowing for accurate point deduction and discount application.

For a complete eCommerce solution with loyalty program integration, you may need to use the following APIs in conjunction with the Loyalty Checkout Exchange API:

  • eCommerce Checkout API: Manages the overall checkout process.
  • Payments API: Handles payment processing for completed checkouts.
  • Loyalty API: Manages the overall loyalty program, including points, rewards, and member information.

These APIs work together to provide a seamless eCommerce experience with integrated loyalty features.

Terminology

  • Loyalty Checkout Discount: A discount applied to a checkout using loyalty points, coupons, or referral rewards.
  • Checkout ID: A unique identifier for a specific checkout instance.
  • Discount Types:
    • LOYALTY_COUPON: A coupon that has already been redeemed. This coupon already exists and does not deduct points when applied during checkout.
    • COUPON_REWARD: A coupon that has not been redeemed but is now being redeemed at checkout. Points are deducted in exchange for this coupon during the checkout process.
    • DISCOUNT_AMOUNT: A flexible reward type where customers choose how many points to spend for a discount during checkout.
    • REFERRAL_REWARD: A coupon received when a customer successfully refers a friend.
  • Discount Status: The current state of a discount, such as APPLIED, COMPLETED, REFUNDED, or FAILED_TO_REFUND.
  • Flexible Reward: A reward type allowing customers to choose how many points to spend for a discount, providing flexibility in how they use their loyalty points.
  • Fixed Reward: A preset coupon exchanging points for a specific money amount, percentage discount, or free shipping.
  • Discount Status: The current state of a discount, such as APPLIED, IN_PROGRESS, COMPLETED, REFUNDED, or FAILED_TO_REFUND.
Did this help?