From 8859d0cedd80f3cb82085d63336083c73e414915 Mon Sep 17 00:00:00 2001 From: Kristin Martin Date: Tue, 17 Nov 2026 22:26:10 +0000 Subject: [PATCH 1/3] Add Link Agent Payments page --- concepts/connectors.mdx | 2 + concepts/link-agent-payments.mdx | 108 +++++++++++++++++++++++++++++++ docs.json | 1 + 3 files changed, 111 insertions(+) create mode 100644 concepts/link-agent-payments.mdx diff --git a/concepts/connectors.mdx b/concepts/connectors.mdx index 3ff278b..90e1cd7 100644 --- a/concepts/connectors.mdx +++ b/concepts/connectors.mdx @@ -29,6 +29,8 @@ Every connector uses one of three credential styles: - **Bring your own key** — you paste an API key you already hold. - **Managed** — the credential comes with your Sprites plan rather than an account of your own. See [Managed providers](#managed-providers). +To let agents pay for things with a single-use card from Link, see [Link Agent Payments](/concepts/link-agent-payments). + **Custom API** is the fallback for anything without a dedicated connector: give it a base URL, a token, and where the token goes, and it wraps any token-authenticated HTTP API. ## Setting up a connector diff --git a/concepts/link-agent-payments.mdx b/concepts/link-agent-payments.mdx new file mode 100644 index 0000000..17e6d40 --- /dev/null +++ b/concepts/link-agent-payments.mdx @@ -0,0 +1,108 @@ +--- +title: Link Agent Payments +description: "Let an agent in a Sprite pay for things with a single-use card from Link, Stripe's wallet. You approve every purchase in the Link app, and your card details stay with Link." +--- + +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](https://link.com), 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 card** + +After 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 + +| Limit | Amount | +| --- | --- | +| Per request | \$500 | +| Per day | \$500 | +| Per 30 days | \$20,000 | +| Time to approve a request | 30 minutes | + +Each card is single use, capped at the approved amount, and stops working after 12 hours. + +## 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](/concepts/connectors#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: + +```bash +npm install -g @stripe/link-cli + +export LINK_API_BASE_URL="https://api.sprites.dev/v1/gateway/link/" +export LINK_ACCESS_TOKEN=sprites-gateway +export LINK_NO_REFRESH=1 +``` + +Don't set `LINK_REFRESH_TOKEN`. + +Check the connection by listing your payment methods: + +```bash +link-cli payment-methods list --format json +``` + +### 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: + +```bash +link-cli spend-request create --test --request-approval --format json \ + --merchant-name "Stripe Press" --merchant-url "https://press.stripe.com" \ + --amount 3500 --currency usd \ + --context "Buying 'Working in Public' from press.stripe.com for the user, who asked for this book in today's session and set a 40 USD budget for it." +``` + +You get a notification to approve the request in the Link app. The agent waits for your approval, for up to 30 minutes: + +```bash +link-cli spend-request retrieve lsrq_... --interval 5 --timeout 1800 --format json +``` + +After you approve, the agent writes the card to a file that only its user can read, instead of printing it in the terminal: + +```bash +link-cli spend-request retrieve lsrq_... --include card \ + --output-file /tmp/link-card.json --format json +``` + +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: + +```bash +curl "https://api.sprites.dev/v1/gateway/link//spend_requests" +``` + +## Related + +- [Connectors](/concepts/connectors) +- [Link CLI on npm](https://www.npmjs.com/package/@stripe/link-cli) diff --git a/docs.json b/docs.json index a8a3832..d2b5959 100644 --- a/docs.json +++ b/docs.json @@ -47,6 +47,7 @@ "pages": [ "concepts/checkpoints", "concepts/connectors", + "concepts/link-agent-payments", "concepts/lifecycle", "concepts/networking", "concepts/services" From 7528da84ebf60f3b878986fa76c9499a5f3e2949 Mon Sep 17 00:00:00 2001 From: Kristin Martin Date: Wed, 18 Nov 2026 17:54:28 +0000 Subject: [PATCH 2/3] Link Agent Payments: link to the MPP credit page --- concepts/link-agent-payments.mdx | 1 + 1 file changed, 1 insertion(+) diff --git a/concepts/link-agent-payments.mdx b/concepts/link-agent-payments.mdx index 17e6d40..637d578 100644 --- a/concepts/link-agent-payments.mdx +++ b/concepts/link-agent-payments.mdx @@ -105,4 +105,5 @@ curl "https://api.sprites.dev/v1/gateway/link//spend_requests" ## Related - [Connectors](/concepts/connectors) +- [Buy Fly.io credit with MPP](https://docs.fly.io/about/mpp-credits), for agents that add credit to your Fly.io organization with Link - [Link CLI on npm](https://www.npmjs.com/package/@stripe/link-cli) From 5c9b42f6d594ede5b570f36fd6a6edbe951a8657 Mon Sep 17 00:00:00 2001 From: Kristin Martin Date: Mon, 23 Nov 2026 16:11:40 +0000 Subject: [PATCH 3/3] Link Agent Payments: link to the connector card for current limits --- concepts/link-agent-payments.mdx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/concepts/link-agent-payments.mdx b/concepts/link-agent-payments.mdx index 637d578..38803f9 100644 --- a/concepts/link-agent-payments.mdx +++ b/concepts/link-agent-payments.mdx @@ -39,6 +39,8 @@ After you approve a spend request, the card number and CVC are available inside 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](https://fly.io/sprites/ecosystem/#connectors/link). + ## Set up the connector 1. In the dashboard, open your organization, then **Connectors**.