# Treats on the house

> Handle a treat on the house from Tamr's AI waiter in your own checkout: price the treat's cart line at zero, then redeem it from your backend once the order is placed.

Source: https://tamr.link/docs/guides/treats

A restaurant can let Tamr give its app's diners a treat on the house: a dish, within the restaurant's own weekly budget and limits, with nobody approving each one. The restaurant pays for it and switches it on in its dashboard. A signed-in diner can get one at most once a day; a guest or a test key never does.

This only concerns you when orders go to your app's cart. When orders go to Tamr, the waiter page handles the treat itself.

## In the chat

The waiter tells the diner of their treat once, in the restaurant's own words, and offers to send it to their cart. It sends it only when they say yes or ask for it.

## On your cart

The waiter puts the treat on the diner's cart like any other line, with `treat: { treatId, expiresAt }` on the cart line (and on [`cart.proposed`](https://tamr.link/docs/webhooks/cart-proposed)'s line). `unitPrice` stays the menu's price: Tamr never asserts a zero price.

cart.add with a treat:

```json
{
  "lines": [
    {
      "lineId": "ln_0012",
      "dishId": "dish_lemonade",
      "variantId": null,
      "optionIds": [],
      "externalId": "DRK-7",
      "variantExternalId": null,
      "optionExternalIds": [],
      "title": "Mint lemonade",
      "variantLabel": null,
      "choices": [],
      "unitPrice": "450",
      "currency": "USD",
      "imageUrl": null,
      "quantity": 3,
      "note": null,
      "treat": {
        "treatId": "trt_9fK2mQ7xLp4vR8sTn1Yc3Wb6",
        "expiresAt": "2026-11-03T19:20:00.000Z"
      }
    }
  ],
  "origin": "diner",
  "conversationId": "cm1conv0001"
}
```

**Price that line at zero in your checkout.** A `treatId` zeroes one line of one portion: if your cart already holds a line with that `treatId`, keep the first at zero and charge any other at its price. Your checkout is the price of record, so this is your guard as well as Tamr's.

## Redeem it

Once the order is placed, redeem the treat from your backend with [Redeem a treat](https://tamr.link/docs/api/redeem-treat), using the secret key that sends your orders (`orders:sdk`). Sending the same order again gets the same answer, so retry freely.

When it can't be redeemed, charge the line as usual:

- `404 not_found`: an unknown id, or another user's.
- `409 treat_refused`, with `treatRefusal`: `expired` (past `expiresAt`, 24 hours after it was given), `withdrawn` (the restaurant took it back) or `already_redeemed` (on another of your orders). `treatRefusal` is an open list.

An app with its own loyalty programme can turn Tamr's treats off: see [Hiding features](https://tamr.link/docs/guides/hiding-features).
