Skip to main content
Connect your Link wallet once, and your v4 agent runs can pay for things: a checkout, a subscription, a ticket, a donation. The agent never gets your real card. For each purchase it asks Link for a one-time credential, and nothing is charged until you approve that purchase in the Link app.

One-time cards

A virtual card for one purchase, typed into a normal checkout form. Your saved card is never shared.

Shared Payment Tokens

For merchants on the Stripe network that accept machine payments: the agent pays over HTTP, without filling out a form.

You approve each one

Each purchase shows up in the Link app with merchant and amount. Approve it, or decline it and the agent stops.

How it works

  1. You connect your Link wallet to a project in the dashboard (once).
  2. You start a run with stripeLinkConnectionId. Only runs that pass it can pay.
  3. When the task needs a payment, the agent creates a spend request for the exact merchant and amount.
  4. Link asks you to approve it in the Link app. The run emits a stripe_link.spend_request event with an approval_url.
  5. After you approve, the agent gets a one-time card (or a Shared Payment Token) and completes the purchase.
The agent works through a Browser Use proxy: it never sees your Link login or your real card number, and it cannot create pre-approved spend requests. Every purchase needs your approval.
  1. Open Integrations in the dashboard and pick the project.
  2. Under Link, click Connect and sign in to Link.
  3. Approve the connection in Link. The card now shows your Link email.
The wallet you connect in the dashboard is the project’s default connection. Connecting again in the dashboard replaces it; Remove disconnects it, and runs that are still going lose access on their next payment step. To connect wallets for your own users, see Connect your users’ wallets.
Link agent wallets are currently available for US Link accounts. If Link says the service is not available in your region, your Link account (or network) is outside the supported region.

2. Get the connection id

  • connectionId is the project’s default connection, which you pass to runs. Reconnecting creates a new id, so don’t cache it forever: read GET /api/v4/stripe-link before a run and use the connectionId and isConnected it returns.
  • mode is live on api.browser-use.com: approved purchases are real charges.
  • If isConnected is false, connect (or reconnect) the wallet in the dashboard first.

3. Start a run that can pay

Write the task like an order: what to buy, from where, and a price limit. The agent buys only what the task asks for, uses the name, email, phone, and shipping addresses saved in your Link account for the checkout, and cancels spend requests it does not use.
  • Follow-up runs. A follow-up POST /runs in the same session must send stripeLinkConnectionId again. Messages queued with POST /sessions/{session_id}/queue keep the previous run’s connection.
  • Dashboard runs. In the dashboard, Pay with Link in the composer is on by default once the project is connected; switch it off for runs that should not pay.

4. Approve the purchase

When the agent is ready to pay, it creates a spend request and waits for you:
  • Link app. You get an approval request in the Link app showing the merchant and the amount. Approve or decline it there.
  • Dashboard. The run’s chat shows a payment card with an approve button that opens Link.
  • API. The run emits stripe_link.spend_request events. Read them with GET /api/v4/runs/{run_id}/events and send approval_url to whoever has to approve:
status moves through pending_approval → approved → succeeded for a completed payment. You can also see denied (you declined), expired (nobody approved in time), canceled (the agent cancelled an unused request) and requires_action (for example a 3-D Secure check). If you decline, the agent stops instead of trying again. While the agent waits, it re-checks the request every few seconds. Unchanged polls are usually collapsed into one event, but the same status can still arrive more than once (we saw repeated pending_approval events in testing), so key on spend_request_id and status.

Connect your users’ wallets

If you build an app on Browser Use, each of your end users can connect their own Link wallet. A project can hold many connections: one or more per end user, each with its own id, like a profile id. Your users don’t need a Browser Use account; they only sign in to Link.

1. Start a connect session

From your server, create a session with your own reference for the user (any opaque string up to 200 characters, for example your user id; it is a label, not proof of identity):
  • Show url to that one user: as a link, a button, or a popup inside your chat. Treat it like a password-reset link: whoever opens it can connect their wallet to this session.
  • The link works for 30 minutes and can be opened again until the user finishes, so chat link previews don’t use it up.
  • returnUrl is optional and must be https. Without it, the user lands on a small “Link connected” page; if you opened the link in a popup, that page posts {"source": "browser-use-link", "status": "connected", "sessionId": "..."} to your window and closes itself.

2. Wait for the user

After the user approves in Link, the session completes once. With returnUrl, the browser comes back with link_session_id, link_status (connected or failed) and, on failure, link_error. Either way, read the result from your server:
status is pending, connected (with connectionId), failed (with error, for example link_declined) or expired. Store the connectionId with your user.

3. Use the connection

  • In agent runs: pass it as stripeLinkConnectionId on POST /api/v4/runs, exactly like the default connection above. The user approves each purchase in their Link app.
  • Without an agent run: call the Link API for that connection through Browser Use, for example to create a spend request from your own checkout code. Browser Use adds the user’s Link token, so your server never sees it, and your Browser Use API key never reaches Link.
The same limits apply as for runs: every purchase needs the user’s approval in Link, and pre-approved (delegated) spend requests are refused.
If your server asks Link for the card on an approved spend request (for example GET .../proxy/spend_requests/{id}?include=card), the response contains the full card number, expiry and CVC. That card data is then yours to protect: keep it out of logs, databases and model prompts, and handle it as PCI cardholder data. Browser Use passes it through and never stores or logs it. If you only need to pay on a Stripe checkout or a machine-payment merchant, prefer a Link Pay Token or a Shared Payment Token, which are not card numbers.

4. List, choose the default, disconnect

A project only ever sees and uses its own connections: ids from another project return 404. API keys need the matching scopes: v4:link:read, v4:link:create, v4:link:delete, and v4:link:pay for the proxy.

Cards vs Shared Payment Tokens

The agent picks the credential that fits the merchant: Some Stripe checkouts offer a Link payment button for AI agents; the agent uses it when it is there. That is a way of paying with the card flow, not a third credential type.

Limits

  • Approval every time. There are no standing or pre-approved budgets: the proxy refuses delegated (pre-approved) spend requests.
  • Many wallets per project. The dashboard connects the project’s default wallet; your users’ wallets connect through connect sessions. Each connection belongs to exactly one project.
  • Not available in the EU deployment, or for zero-data-retention projects.
  • Reconnect when asked. Link can revoke access (for example after a long time without use). Browser Use may not notice right away: until it marks the connection as needing reauthentication, GET /api/v4/stripe-link can still report isConnected: true and runs still start, but the agent’s Link calls fail at payment time with a link_unauthorized error. Once the connection is marked, the dashboard shows Reconnect, the status API returns isConnected: false, and new runs that send the id get 422 stripe link connection not found. Reconnect in the dashboard in either case.
  • Pricing. Browser Use charges nothing extra for Link. You pay the merchant through Link as usual.

Troubleshooting