deleteCart(cartInput)

Deletes a cart in a webstore.

deleteCart uses this Commerce API resource.

  • webstoreId—(Required) The ID of the webstore. The ID prefix is 0ZE.
  • activeCartOrId—(Required) The ID of the cart to delete, or the string active to target the buyer’s active cart.
  • version—(Required) The API version for the adapter, for example, v62.0. Without this parameter, the call doesn’t fire.
  • effectiveAccountId—(Optional) The effective account ID for the cart operation.

The return type is void. On success, the server returns 204 No Content. On error, the Promise rejects with an error object containing an errorCode and a message.

deleteCart is an imperative function, not a @wire adapter. Call it in response to a user action.

If the call fails, the Promise rejects with an error object containing an errorCode and a message.

See Also