This endpoint is used to exchange a customer's accumulated points for any preset reward, such as free goods or discounts.The exchange endpoint has been implemented in the Loyalty Web Component , and It's all setup to save developer's time and effort. Payload authenticated
#
The id of the prize to be awared
The id of the customer cart
Response#
Data is available when the success is true
Usage#
To perform the action of exchanging a customer's accumulated points for any preset reward, the method exchange()
may be called as below:Events#
This endpoint may trigger two events, the onExchangeSucceeded and onExchangeFailed events.onExchangeSucceeded#
This event is triggered when performing the action of exchanging a customer's accumulated points for any preset reward is done without having any errors coming back from the backend.onExchangeFailed#
This event is triggered when performing the action of exchanging a customer's accumulated points for any preset reward is not completed and an error has occurred. Modified at 2025-03-04 12:54:02