Skip to content
Create account or Sign in
The Stripe Docs logo
/
Ask AI
Create accountSign in
Get started
Payments
Revenue
Platforms and marketplaces
Money management
Developer resources
APIs & SDKsHelp
OverviewAccept a paymentUpgrade your integration
Online payments
OverviewFind your use case
Use Payment Links
Build a payments page
Build a custom integration with Elements
Build an in-app integration
Use Managed Payments
Recurring payments
In-person payments
Terminal overview
Availability
Readers
No code
Custom integration
Payment methods
Add payment methods
Manage payment methods
Faster checkout with Link
Payment operations
Analytics
Balances and settlement time
Compliance and security
Currencies
Declines
Disputes
Radar
Payouts
ReceiptsRefunds and cancellations
Advanced integrations
Custom payment flows
Flexible acquiring
Off-Session Payments
Multiprocessor orchestration
Beyond payments
Incorporate your company
Crypto
Agentic commerce
    Overview
    For sellers
    Sell through agents
    Monetize your MCP server
    For agents
    Embed commerce into your AI interface
    Link CLI
      Set up OAuth
      Retrieve payment credentials with spend requests
      Search products and complete payments with UCP
      Pay machine-payment merchants
    Concepts
    Accept machine payments
    Shared payment tokens
    Catalog feed
    Universal Commerce Protocol
    Agentic Commerce Protocol
Financial Connections
Climate
Verify identities
United States
English (United States)
  1. Home/
  2. Payments/
  3. Agentic commerce

Link CLI

Let your agent pay online and give financial insights to your customers.

Availability

Link CLI is available to US consumers. Your agent and the sellers your customers buy from can be outside of the US.

Link CLI gives your agent access to a wallet that your customer controls. Your agent can retrieve one-time-use payment credentials to complete purchases, and retrieve permissioned financial data to answer questions about spending, balances, and trends. Learn how to set up a hosted agent, where you operate the agent on behalf of your customers. To use Link CLI with your own local agent, see the link-cli repository.

Most integrations use both capabilities. Set up OAuth once, then request the scopes for whichever capabilities you need.

Capabilities

Link CLI has two capabilities: agent payments and financial insights.

CapabilityDescriptionExample use case
Agent paymentsYour agent retrieves one-time-use payment credentials to complete purchases. Customers approve each request on the Link website or in the mobile app. Agent payments support one-time-use virtual cards and shared payment tokens.“Buy me this book from Stripe Press”
Financial insightsYour agent reads transaction history, balances, and account details from connected bank accounts and credit cards.“What did I spend on dining this month?”

How it works

Your agent gets an access token through OAuth, then uses that token to call Link on your customer’s behalf:

  1. You register an OAuth client to authenticate your agent.
  2. Your agent redirects customers to the Link authorization endpoint with the requested scopes.
  3. Customers authenticate and approve the requested permissions. For financial insights, they also choose which accounts to share.
  4. Your agent exchanges the authorization code for an access token.
  5. Your agent calls Link to search products, retrieve one-time-use payment credentials, or retrieve financial data.

Link API

Link CLI calls the Link API at api.link.com, and authorizes against login.link.com. These APIs are separate from the Stripe API at api.stripe.com, which changes how you authenticate and which tools you can use.

  • You authenticate with an OAuth access token instead of a Stripe secret key. Link CLI reads the token from LINK_ACCESS_TOKEN.
  • You call the endpoints through Link CLI, or send HTTP requests directly. Stripe’s server-side SDKs don’t cover these endpoints.
  • These endpoints don’t appear in the Stripe API reference.

Your agent can inspect the full CLI documentation with link-cli --llms-full, and the current input contract for any command with link-cli <command> --schema.

To use financial insights, you need a Stripe account with Financial Connections registration. Your Stripe publishable key initiates the OAuth flow that reads financial data. To use the agent wallet for payments, you don’t need a Stripe account, though registering an OAuth client improves the experience.

Handling customer financial data

Because your agent is a hosted service, your company acts as a data recipient. You’re responsible for how customer financial data is handled within your application.

Get started

Every integration starts with OAuth. Set up OAuth, then follow the guide for what you want your agent to do:

  • Retrieve payment credentials with spend requests: retrieve one-time-use virtual cards and shared payment tokens.
  • Search products and complete payments with UCP: discover and buy products across sellers.
  • Pay machine-payment merchants: pay merchants that accept machine payments over HTTP 402.
  • Add financial insights to your agent: retrieve transactions, balances, and account data.

See also

  • Agentic Commerce
  • link-cli repository
Was this page helpful?
YesNo
  • Need help? Contact Support.
  • Chat with Stripe developers on Discord.
  • Check out our changelog.
  • Questions? Contact Sales.
  • LLM? Read llms.txt.
  • Powered by Markdoc
On this page
Advertisement
Advertisement