PUT
/
api
/
v1
/
locations
/
{locationId}
/
carts
/
{cartId}
/
gratuity
{
  "amount": "5.00"
}
{
  "id": "64a7b8c9d1e2f3a4b5c6d7e8",
  "locationId": "64a7b8c9d1e2f3a4b5c6d7e9",
  "items": [
    {
      "id": "64a7b8c9d1e2f3a4b5c6d7ea",
      "productId": "64a7b8c9d1e2f3a4b5c6d7eb",
      "productName": "Margherita Pizza",
      "quantity": 2,
      "price": "33.98",
      "modifiers": [],
      "specialInstructions": ""
    }
  ],
  "discountCode": null,
  "currency": "usd",
  "fulfilmentMethod": "takeout",
  "statementDescriptor": "Downtown Pizza Co",
  "subTotal": "33.98",
  "discountTotal": "0.00",
  "waiterTipTotal": "6.12",
  "taxAndFeeTotal": "3.97",
  "taxTotal": "2.97",
  "serviceFeeTotal": "1.00",
  "deliveryFeeTotal": "0.00",
  "orderTotalWithServiceFee": "43.07",
  "orderTotalWithServiceFeeAmount": 4307,
  "restaurantDisplayName": "Downtown Pizza Co",
  "orderTime": "12:30 PM",
  "orderDate": "Mon, Jan 15 2024",
  "fees": {
    "enterpriseFeeRate": "0.0000",
    "enterpriseFeeFix": "0.00",
    "serviceFeeRate": "0.025",
    "serviceFeeFix": "0.00",
    "taxRate": "0.0875",
    "tipRate": "0.18",
    "deliveryFeeFix": "0.00",
    "deliveryFeeRate": "0.0000"
  },
  "pickupType": "ASAP",
  "fulfillmentIdentifier": "64a7b8c9d1e2f3a4b5c6d7e8",
  "totalQuantity": 2,
  "checkoutUrl": "https://checkout.cravejs.com/cart/64a7b8c9d1e2f3a4b5c6d7e8"
}

Path Parameters

locationId
string
required
The unique identifier for the restaurant location
cartId
string
required
The unique identifier for the cart

Request Body

amount
string
Fixed tip amount as a string (e.g., “5.00” for $5.00). Provide either amount or percentage, not both.
percentage
string
Tip percentage as a string (e.g., “18” for 18%). Provide either amount or percentage, not both.
{
  "amount": "5.00"
}
{
  "id": "64a7b8c9d1e2f3a4b5c6d7e8",
  "locationId": "64a7b8c9d1e2f3a4b5c6d7e9",
  "items": [
    {
      "id": "64a7b8c9d1e2f3a4b5c6d7ea",
      "productId": "64a7b8c9d1e2f3a4b5c6d7eb",
      "productName": "Margherita Pizza",
      "quantity": 2,
      "price": "33.98",
      "modifiers": [],
      "specialInstructions": ""
    }
  ],
  "discountCode": null,
  "currency": "usd",
  "fulfilmentMethod": "takeout",
  "statementDescriptor": "Downtown Pizza Co",
  "subTotal": "33.98",
  "discountTotal": "0.00",
  "waiterTipTotal": "6.12",
  "taxAndFeeTotal": "3.97",
  "taxTotal": "2.97",
  "serviceFeeTotal": "1.00",
  "deliveryFeeTotal": "0.00",
  "orderTotalWithServiceFee": "43.07",
  "orderTotalWithServiceFeeAmount": 4307,
  "restaurantDisplayName": "Downtown Pizza Co",
  "orderTime": "12:30 PM",
  "orderDate": "Mon, Jan 15 2024",
  "fees": {
    "enterpriseFeeRate": "0.0000",
    "enterpriseFeeFix": "0.00",
    "serviceFeeRate": "0.025",
    "serviceFeeFix": "0.00",
    "taxRate": "0.0875",
    "tipRate": "0.18",
    "deliveryFeeFix": "0.00",
    "deliveryFeeRate": "0.0000"
  },
  "pickupType": "ASAP",
  "fulfillmentIdentifier": "64a7b8c9d1e2f3a4b5c6d7e8",
  "totalQuantity": 2,
  "checkoutUrl": "https://checkout.cravejs.com/cart/64a7b8c9d1e2f3a4b5c6d7e8"
}
The tip is stored internally as a rate (decimal) in the fees.tipRate field. The actual tip amount is calculated and returned in the waiterTipTotal field as a formatted currency string.

Authorizations

X-API-Key
string
header
required

Path Parameters

locationId
string
required

The unique identifier for the restaurant location

cartId
string
required

The unique identifier for the cart

Body

application/json

Response

200
application/json

Tip updated successfully. Returns the full cart with recalculated totals.

The response is of type object.