Clear All Products from Customer's Cart

Description

This endpoint allows users to clear all products from their checkout cart. The operation removes all products associated with the user's cart.

Endpoint

https://merchant.payervault.com/api/v1/cart/clearAll

Method

Authentication

This endpoint requires authentication using an accessKey and accessSecret. These credentials need to be included in the request headers for authorization.

Request Headers

accessKey :Access key for authentication
accessSecret : Access secret for authentication.

Request Body:

  • Schema:

    {
      "customerID": "string (required)",
    }
    

Response

Success Response:

  • Status Code: 200 OK

  • Body: JSON object indicating the success of the operation.

    {
        "success": true,
        "message": "Cleared all products from the cart!"
    }
    

Error Response:

  • Status Code:

    • 500 Internal Server Error: If an unexpected error occurs.
  • Body: JSON object with an error message.

    {
        "success": false,
        "message": "Internal server error"
    }