# Link Agent Wallet

Let your agent pay online and access your customer's financial data.

Link Agent Wallet gives your agent programmatic access to a customer’s Link account. Your agent can request a payment credential it can safely use to transact anywhere on the internet, or for access to the customer’s connected financial accounts.

## What you can build 

| Use case | What your agent does | Example |
| --- | --- | --- |
| [Enable agents to spend](https://docs.stripe.com/agentic-commerce/agents/link-agent-wallet/use-link-wallet-pay-online.md) | Creates a spend request for a specific purchase. The customer approves it, and Link returns a one-time-use payment credential your agent uses to pay. | “Buy me this book from Stripe Press” |
| [Add financial insights](https://docs.stripe.com/financial-connections/agents/financial-insights.md) | Reads transactions, balances, and account details from the accounts your customer chooses to share. | “What did I spend on dining this month?” |

One integration can use both or either capability, depending on the scopes you request.

## Choose an integration approach 

Link Agent Wallet offers a command-line tool and a set of SDKs. Both talk to the same API and return the same objects.

| Approach | Use it when | Install |
| --- | --- | --- |
| CLI | Your agent runs shell commands. [stripe/link-cli](https://github.com/stripe/link-cli) handles authentication, token storage, token refresh, and polling for you, and every command self-describes so an agent can discover its own arguments. | `npm install -g @stripe/link-cli` |
| SDK | You’re writing a hosted service and want typed calls without a subprocess. [packages/sdk](https://github.com/stripe/link-cli/tree/main/packages/sdk) covers the API resources only, and your application owns authentication and credential storage. | `npm install @stripe/link-sdk` |

A Go SDK is available at [packages/sdk-go](https://github.com/stripe/link-cli/tree/main/packages/sdk-go). It exposes the same capabilities as the TypeScript SDK.

## Availability 

| Capability | Available to |
| --- | --- |
| Agent payments | US and Canadian customers |
| Financial insights | US customers |

Your own business can be outside these countries as can the sellers your customers buy from.

## The Link API 

Link Agent Wallet calls the Link API at `api.link.com` and authorizes against `login.link.com`. These are separate from the Stripe API at `api.stripe.com`, which changes how you authenticate and which tools apply:

- You authenticate with an OAuth access token that represents one customer, not with a Stripe API key. Neither secret keys nor restricted API keys authenticate requests to the Link API. The CLI and SDKs read the token from `LINK_ACCESS_TOKEN`.
- The Stripe server-side SDKs don’t cover these endpoints, and they don’t appear in the [Stripe API reference](https://docs.stripe.com/api.md). Use the CLI, a Link SDK, or plain HTTP requests.
- `login.link.com` publishes its own [authorization server metadata](https://login.link.com/.well-known/oauth-authorization-server), which is the authoritative source for its OAuth endpoints.

Using financial insights additionally requires a Stripe account registered for [Financial Connections](https://docs.stripe.com/financial-connections.md), because your Stripe publishable key initiates the authorization flow that reads financial data. Agent payments don’t require a Stripe account, but registering an OAuth client gives your customers a better approval prompt.

> #### Handling customer financial data
> 
> A hosted agent makes your company a data recipient. You’re responsible for how customer financial data is handled inside your application.

## See also

- [Authorize your agent](https://docs.stripe.com/agentic-commerce/agents/link-agent-wallet/oauth.md)
- [Enable agents to spend](https://docs.stripe.com/agentic-commerce/agents/link-agent-wallet/use-link-wallet-pay-online.md)
- [Link Agent Wallet repository](https://github.com/stripe/link-cli)
