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.
- See your Link tokens or your real card details.
- Approve its own purchases.
- Change your payment methods, addresses or approval settings.
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
- In the dashboard, open your organization, then Connectors.
- Click Add connection and choose Link Agent Payments.
- Click Continue with Link and sign in to your Link account.
- 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.
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:
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:
Call the API directly
The same API is available over plain HTTP through the gateway:Related
- Connectors
- Buy Fly.io credit with MPP, for agents that add credit to your Fly.io organization with Link
- Link CLI on npm