This endpoint is used to add a product that has been gifted to the shopping cart, after which the customer can be redirected to the shopping cart page in order to complete the purchase of that product as a solo.The add gift to cart endpoint has been implemented in the Gifting Web Component, and It's all setup to save developer's time and effort. Payload authenticated
#
The id of the product to be gifted.
Response#
product.addGiftToCart.success
Data is available when the success is true
The url of the checkout page
Usage#
To perform the action of adding a product that has been gifted to the shopping cart, the developer may call the method addGiftToCart
as follows.Events#
This endpoint may trigger two events, the onAddGiftToCartSucceeded and onAddGiftToCartFailed events.onAddGiftToCartSucceeded#
This event is triggered when the action of adding a product that has been gifted to the shopping cart is done without having any errors coming back from the backend.onAddGiftToCartFailed#
This event is triggered when the action of adding a product that has been gifted to the shopping cart is not completed and an error has occurred. Modified at 2025-03-04 12:54:02