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

> Link a merchant account so the agent can shop and check out there

Links a merchant account so the agent can shop and check out there. Cooperative merchants (Rappi) reply that a one-time code was sent, which you finish with [buy\_confirm\_merchant](/companies/mcp/tools/buy_confirm_merchant); learned merchants (Good Eggs, DoorDash) link in one step, and DoorDash needs the user's captured browser session.

<Note>Not advertised in `tools/list` by default — the [buy](/companies/mcp/tools/buy) tool covers this conversationally. Expert integrations can still call it by name.</Note>

## Parameters

| Parameter          | Type   | Required | Description                                         |
| ------------------ | ------ | -------- | --------------------------------------------------- |
| `merchant`         | string | Yes      | Merchant slug (`rappi`, `goodeggs`, or `doordash`). |
| `email`            | string | Yes      | Email for the merchant account.                     |
| `first_name`       | string | Yes      | First name on the merchant account.                 |
| `last_name`        | string | Yes      | Last name on the merchant account.                  |
| `phone`            | string | Yes      | Phone number for the merchant account.              |
| `captured_session` | object | No       | DoorDash only: cookies captured client-side.        |

## Returns

On a one-step link, confirmation that the merchant is linked and ready to shop. Cooperative merchants return a "code sent" message (with the masked destination) plus the `merchant` and `pending_id` to pass to `buy_confirm_merchant` along with the code the user received. Failures return a short error message.

## Example

```json theme={null}
{ "name": "buy_link_merchant", "arguments": { "merchant": "rappi", "email": "sam@example.com", "first_name": "Sam", "last_name": "Rivera", "phone": "+14155550123" } }
```
