The following steps outline the Carts process, from creating a cart to generating an order draft:
Create an empty cart for shoppers to add products for purchase.
You can customize the cart settings by sending configuration details in the request body. Otherwise, the default settings apply. For more information about cart configuration behaviors, see Configuration Behaviors section. If the initial request is successful, a response body containing cart information, such as cartId and configurations is returned.
Create a destination address to fulfill the order in the cart.
You can delete or update the address. If the initial request is successful, a response body that contains the address information is returned.
Add items to the cart.
You can update or delete items in the cart. If the initial request is successful, a response body that contains the cart information, including the items that are added, is returned.
(Optional) Apply any eligible coupons for the cart.
Use remove the coupon endpoint to remove coupons if necessary. If the initial request is successful, a response body that contains the cart information, including the coupon information, is returned.
Add tax rules for the cart. Look up the usage as tax rates vary by location. You must apply the appropriate taxes for each area.
If the initial request is successful, a response body that contains cart information with the updated tax rates is returned.
Create an order draft. If the payment is authorized, then the order is shipped.
If the initial request is successful, the response containing all the necessary information for an order to ship is returned. Before submitting the order details, ensure that all the information for the order is correct.