Points by Cart

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Calculates loyalty points for an entire shopping cart. It retrieves the associated merchant information and extracts the list of items from the request. The function determines the default loyalty rate for the merchant, if available, and also attempts to identify the user based on their phone number. Tt calculates the total loyalty points to be earned for the entire cart considering the total amount spent, the merchant details, and user information, if available. The function then iterates over each item in the cart, computing the loyalty points to be earned for each item individually. Finally, it returns a success response containing an array of items with their respective loyalty points and the total loyalty points for the entire cart.

Body Params
string
double
required
items
array
items
Responses

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json