Add Discount to Cart
6min
Once items are added to a cart, it's possible to add discounts to it.
POST /checkout/cart/{cart_id}/discounts
Add a discount to a cart. API Reference: Add Discount to Cart
Request
cart_id - the ID of the cart you would like to add this SKU to
Required Body Parameters:
code - the code (provided by the merchant) of the discount you wish to add to the cart
merchant_id - the merchant ID the code belongs to
Discount is only applied when the cart has at least one product from the provided merchant_id.
Curl
|
Response
JSON
|
Discount Considerations
When submitting a cart with discounts, only APPLIED discounts are considered, all other discount statuses will be cleaned from cart.
Discount statuses:
- PENDING - Discount added to cart, but not applied to merchant platform yet.
- APPLIED - Discount added to cart, validated and applied to merchant platform.
- INVALID - Invalid discount in merchant platform, check order errors for details.
- NOT_SUPPORTED - Platform currently not supported.
- ERROR - Unexpected error applying discount, check order errors for details.
- EXPIRED - Discount previously applied that is no longer valid in the merchant platform.
Current supported platforms:
- BigCommerce
- Magento
- WooCommerce
Updated 23 May 2023
Did this page help you?
Yes
No