Skip to main content
The Link Agent Payments connector lets an agent running in a Sprite pay for things on your behalf. The agent asks for a single-use virtual card for one purchase, with a merchant and an amount. You approve the request in the Link app, and the agent gets a card it can use for that purchase only. Your real card details stay with Link, Stripe’s wallet. The agent never sees your Link tokens, and it can’t approve its own purchases. Link Agent Payments works with Link accounts in the US and Canada.

What an agent can and can’t do

An agent in an allowed Sprite can:
  • Create, check and cancel spend requests.
  • Collect the single-use card after you approve a request.
An agent can’t:
  • See your Link tokens or your real card details.
  • Approve its own purchases.
  • Change your payment methods, addresses or approval settings.
Anyone who controls an allowed Sprite can read the cardAfter you approve a spend request, the card number and CVC are available inside the Sprite. Only give access to Sprites you trust, and approve only the requests you expect.

Limits

Each card is single use, capped at the approved amount, and stops working after 12 hours. For the current limits, see the Link Agent Payments connector card.

Set up the connector

  1. In the dashboard, open your organization, then Connectors.
  2. Click Add connection and choose Link Agent Payments.
  3. Click Continue with Link and sign in to your Link account.
  4. Choose which Sprites can use the connector. Like every connector, it’s deny-by-default, so no Sprite can use it until you grant access. See Configuring access.
The connector’s detail page shows its gateway URL and connection ID.

Use it from a Sprite

Agents use Link CLI (@stripe/link-cli) in the Sprite, pointed at the Sprites gateway. The gateway adds and refreshes your real Link token, so the Sprite only needs a placeholder:
Don’t set LINK_REFRESH_TOKEN. Check the connection by listing your payment methods:

Make a purchase

The agent creates a spend request with the merchant, the amount in cents, and some context about the purchase. The context must be at least 100 characters. Add --test to get a test card that charges nothing:
You get a notification to approve the request in the Link app. The agent waits for your approval, for up to 30 minutes:
After you approve, the agent writes the card to a file that only its user can read, instead of printing it in the terminal:
The agent then uses the card at the merchant’s checkout.

Call the API directly

The same API is available over plain HTTP through the gateway: