deleteCartCoupon
Deletes a coupon from a cart.
This method communicates with the deleteCartCoupon method of the Vue Storefront API Middleware. In turn, it receives data from the getCart endpoint exposed by the BigCommerce API
Signature
declare function deleteCartCoupon$1(
props: DeleteCouponParameters,
options?: MethodOptions
): Promise<DeleteCouponResponse>;Parameters
| Name | Required | Type | Description |
|---|---|---|---|
props | Required | DeleteCouponParameters | Parameter object which can be used with this method. Refer to its type definition to learn about possible properties. |
options | Optional | MethodOptions | Options available for a method. |
Returns
Returns a response with the cart object used in storefront cart responses.
Referenced Types
Examples
Deleting a coupon from a cart that matches the id from the query.
import { sdk } from '~/sdk.config.ts';
const cart = await sdk.bigcommerce.deleteCoupon({ checkoutId: "930a1424-e8e8-4757-b4f6-8de76c8106cb", "couponCode": "some-code" });