A coupon is a code that consists of a special series of characters, or string, used by customers to get a discounted price or limited offer on the cart's items. This add endpoint is used for this purpose.Payload#
The code of the coupon in form of string.
Response#
Usage#
To perform the action of applying a coupon to the cart's items, the developer may call the add()
as shown below.Events#
This endpoint may trigger two events, the onCouponAdded and onCouponAdditionFailed events.onCouponAdded#
This event is triggered when applying a new coupon by the customer is done without having any errors coming back from the backend.onCouponAdditionFailed#
This event is triggered when applying a new coupon by the customer is not completed and an error has occurred. Modified at 2024-02-18 08:51:05