DiscountsAPI
The API for interacting with discounts.
Anchor to standardapiStandardApi
The base API object provided to purchase
extension targets.
Discounts that have been applied to the entire cart.
A list of discount codes currently applied to the checkout.
Anchor to checkoutapiCheckoutApi
The API object provided to purchase.checkout
extension targets.
Performs an update on the discount codes. It resolves when the new discount codes have been negotiated and results in an update to the value retrieved through the property.
> See security considerations if your extension retrieves discount codes through a network call.
This method will return an error if the cart instruction is false, or the buyer is using an accelerated checkout method, such as Apple Pay, Google Pay, or Meta Pay.
Anchor to useApplyDiscountCodeChangeuse Apply Discount Code Change()
Returns a function to add or remove discount codes.
Anchor to useDiscountAllocationsuse Discount Allocations()
Returns the current discount allocations applied to the cart.
Anchor to useDiscountCodesuse Discount Codes()
Returns the current discount codes applied to the cart.