How do you add a product to cart with a custom price?

curl -X POST https://example.com/wp-json/cocart/v2/cart/add-item \
  -H "Content-Type: application/json" \
  -d '{
    "id": "129",
    "quantity": "1",
    "price": 24
  }'

This is the most simplest way of adding a product to the cart with a custom price.

Was this helpful to you?