Introduction

The Loyalty Checkout 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 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.

  • To use the Loyalty Checkout Exchange API, import { checkoutExchange } from the wix-loyalty.v2 module:

    Copy
    1

Use cases

  • Apply a loyalty discount during checkout.
  • Query loyalty checkout discounts.

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.

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.
Was this helpful?
Yes
No