> ## 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_connect

> Connect a merchant for shopping.

Connect to `https://mcp.agentcard.sh/mcp` with the **user's connection token** (or a `buy_token` for org-owned accounts).

## What it does

Connect a merchant for shopping. For merchants that need a real login (e.g. DoorDash) this opens a secure hosted browser session and returns a URL the user opens to log in; after they finish, call buy\_connect\_status with the pending\_id to confirm. Merchants that need no login (e.g. Agentcard Flights) come back ready immediately. Use this instead of buy\_link\_merchant for hosted-login merchants. This tool pairs only with buy\_connect\_status and only tracks logins it started itself; a login link handed out by the conversational `buy` tool has no pending\_id and is verified inside that same buy conversation (the user replies there, e.g. "done — I logged in").

## Inputs

| Field                   | Type   | Description                   |
| ----------------------- | ------ | ----------------------------- |
| `merchant` *(required)* | string | merchant slug (e.g. doordash) |

## Returns

| Field                  | Type   | Description                                                                                                     |
| ---------------------- | ------ | --------------------------------------------------------------------------------------------------------------- |
| `message` *(required)* | string | Human-readable next step.                                                                                       |
| `status`               | string | Outcome: 'pending' (hosted login started), 'ready'/'linked' (auto-link merchant — no login needed), or 'error'. |
| `loginUrl`             | string | URL the user must open to log in to the merchant. Absent for auto-link merchants.                               |
| `pendingId`            | string | Session id to pass to buy\_connect\_status. Absent for auto-link merchants.                                     |
| `merchant`             | string | The merchant slug, present when an auto-link merchant needs no login.                                           |

## Example call

```json theme={null}
{
  "tool": "buy_connect",
  "arguments": {
    "merchant": "\u2026"
  }
}
```
