> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agentcard.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# Buy

> Shop and check out at linked merchants from the terminal

The `agent-cards buy` surface lets you shop at linked merchants and check out with a virtual card. The fastest way is natural language; granular subcommands exist for scripted or expert use. For the bigger picture, see the [Shopping guide](/personal/shopping).

## Chat to shop

```bash theme={null}
agent-cards buy                                  # open the buy chat
agent-cards buy the caesar salad from Zuni on doordash   # seed the chat with a request
agent-cards buy chat --resume <id>               # resume a conversation
```

Bare `buy` (or any free-text after `buy` that isn't a subcommand) opens the conversational buy agent, which walks you through finding items, building a cart, and checking out.

## Link a merchant

```bash theme={null}
agent-cards buy merchants                        # list merchants and link status
agent-cards buy link <merchant> --email <e> --first-name <f> --last-name <l> --phone <p>
agent-cards buy confirm <merchant> --pending <pendingId> --code <code>
agent-cards buy connect <merchant>               # link by logging in via a hosted browser (doordash)
agent-cards buy unlink <merchant>                # disconnect a merchant
```

Supported merchants include `rappi`, `goodeggs`, and `doordash`.

## Browse and build a cart

```bash theme={null}
agent-cards buy stores <merchant> <query>        # find stores within a multi-store merchant (DoorDash)
agent-cards buy store <merchant> <storeId>       # scope searches + cart to one store
agent-cards buy search <merchant> <query>        # search a merchant for products
agent-cards buy cart <merchant>                  # view the cart
agent-cards buy add <merchant> <productId> [--quantity <n>]
agent-cards buy qty <merchant> <productId> <quantity>     # set quantity (0 removes)
agent-cards buy remove <merchant> <productId>
agent-cards buy clear <merchant>                 # empty the cart
```

## Budgets

```bash theme={null}
agent-cards buy budget <period> <limitDollars> [--timezone <tz>]
```

Set a spend budget where `period` is `daily`, `weekly`, `monthly`, or `total`.

## Check out

```bash theme={null}
agent-cards buy checkout <merchant> --yes
```

Checkout is **destructive** (it places and pays for the order) and requires `--yes`.

| Option                    | Description                                                             |
| ------------------------- | ----------------------------------------------------------------------- |
| `--yes`                   | Confirm placing the order.                                              |
| `--tip <dollars>`         | Dasher tip in dollars; added to the charge and card size.               |
| `--schedule <iso>`        | Schedule delivery for an ISO-8601 time; default is ASAP.                |
| `--approval <approvalId>` | A spend approval id, if checkout returned `needs_approval`.             |
| `--idempotency-key <key>` | Reuse the same key on a retry so a timed-out call never double-charges. |

## Orders

```bash theme={null}
agent-cards buy orders <merchant> [--limit <n>]              # recent order history (max 50)
agent-cards buy reorder <merchant> <orderId>                 # re-create a cart from a past order
agent-cards buy track <merchant> <orderId>                   # status + ETA for a placed order
agent-cards buy substitution <merchant> <orderId> <itemMsid> <preference>   # similar | refund | contact
```

## Delivery addresses

```bash theme={null}
agent-cards buy addresses <merchant>                  # list saved delivery addresses
agent-cards buy set-address <merchant> <addressId>    # set the default delivery address
```
