Skip to navigation

Add Discount to Checkout

Adds or replaces manual discounts on an existing checkout.

Each request sets the checkout’s complete manual-discount state. The request is not additive: manual discounts from an earlier request that you omit from the new payload are removed. This endpoint does not remove coupons or automatic promotions.

Use the request body to apply:

  • An order-level manual discount with cart.discounts[].discounted_amount. BigCommerce distributes the discount across line items based on each item’s value.
  • An item-level manual discount with cart.line_items[].id and cart.line_items[].discounted_amount.
  • Order-level and item-level manual discounts together by including both arrays in the same request.

Manual discounts interact with coupons and automatic promotions as follows:

Manual discount levelCoupon or automatic promotion levelBehavior
OrderOrder or itemThe discounts stack. The result is fully additive and does not depend on which discount is applied first.
ItemOrder or itemThe discounts are mutually exclusive, and the first-applied discount remains. A conflicting manual-discount request is rejected, a coupon request returns a 422 response, and an automatic promotion does not apply.

If an item-level manual discount is already applied, adding a coupon returns a 422 response with the message “Coupon {coupon_code} cannot be applied in combination with item level manual discount.” An eligible automatic promotion does not apply while an item-level manual discount exists.

The required field is discounted_amount at the order level, item level, or both.

To prevent lost updates from concurrent requests, include the optional version field in the request payload. If the provided version does not match the server’s cart version, the API returns a conflict error.

Authentication

X-Auth-Tokenstring

OAuth scopes

UI NamePermissionParameter
Checkoutsmodifystore_checkouts
Checkoutsread-onlystore_checkouts_read_only
Checkout Contentmodifystore_checkout_content
Checkout Contentread-onlystore_checkout_content_read_only

Authentication header

HeaderArgumentDescription
X-Auth-Tokenaccess_tokenFor more about API accounts that generate access_tokens, see our Guide to API Accounts.

Further reading

For example requests and more information about authenticating BigCommerce APIs, see Authentication and Example Requests.

For more about BigCommerce OAuth scopes, see our Guide to API Accounts.

For a list of API status codes, see API Status Codes.

Path parameters

checkoutIdstringRequired

ID of the checkout; the same as the cart ID.

store_hashstringRequired
Permanent ID of the BigCommerce store.

Headers

AcceptstringRequiredDefaults to application/json

The MIME type of the response body.

Request

This endpoint expects an object.
cartobjectOptional

The complete manual-discount state to apply to the checkout.

Response

OK
dataobjectOptional
metaobjectOptional
Response metadata.

Errors

409
Conflict Error