Introduction

The Loyalty Accounts API allows you to create and manage your customer loyalty accounts.

With the Loyalty Accounts API, you can:

  • Create a loyalty account for a site contact.
  • Manually adjust points in a loyalty account.
  • Set up functions that allow loyalty accounts to earn points through their actions.

To use the Loyalty Accounts API, import { accounts } from the wix-loyalty.v2 module.

Copy
1

Before you begin

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

  • To create a new loyalty account, a customer must first be a site contact with a contact ID.

Terminology

  • Account ID: Every loyalty account gets a new account ID which is different from that customer's contact ID and member ID.
  • Transaction: A loyalty transaction includes any activity that changes a loyalty account point balance, such as adjusting, earning, or redeeming loyalty points.

Permissions information

Functions in the Loyalty Accounts API are restricted and only run if you elevate permissions using the wix-auth elevate() function.

Warning: Elevating a function allows it to be called by any site visitor. Exercise caution to prevent security vulnerabilities.

Was this helpful?
Yes
No