> ## Documentation Index
> Fetch the complete documentation index at: https://docs.crossmint.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Agent Checkouts

> One API to start from any URL and buy with any payment method the merchant accepts, under a spending cap you set

<video className="w-full rounded-xl" autoPlay muted loop playsInline src="https://mintcdn.com/crossmint/-Rn7L8WaqdsO5e7L/images/agents/checkouts/agent-checkouts.mp4?fit=max&auto=format&n=-Rn7L8WaqdsO5e7L&q=85&s=85dc92cef34eb73a194bccbc1da6de20" data-path="images/agents/checkouts/agent-checkouts.mp4" />

Agent Checkouts lets your agent buy from any merchant with a single API. Start a run from any URL, optionally describe what to buy in natural language, and set a spending cap. Crossmint completes the purchase on your user's behalf and returns the receipt.

Behind that API, Crossmint picks the right rail for each merchant: an agentic commerce protocol where the merchant supports one, and an optimized browser session everywhere else. You integrate once and get every merchant. For the problem this solves and how it compares to building it yourself, read [How Agents Buy](/agents/how-agents-buy).

<Note>Agent Checkouts runs in production only. There is no staging environment, so use a production API key and live auth credentials.</Note>

## Key Features

<CardGroup cols={3}>
  <Card title="Any merchant" icon="store" iconType="duotone" color="#24ABD0">
    Any starting URL, with or without a purchase API or protocol support
  </Card>

  <Card title="Any payment method" icon="money-bill-transfer" iconType="duotone" color="#D31D52">
    Crossmint Agent Cards, other agent cards, cards on file, Apple Pay, Google Pay, PayPal, Shop Pay, and more
  </Card>

  <Card title="Right rail per merchant" icon="route" iconType="duotone" color="#36B37E">
    Agentic commerce protocols where supported, an optimized browser everywhere else
  </Card>

  <Card title="Hard spending cap" icon="gauge-high" iconType="duotone" color="#D3A10F">
    The checkout never spends above the cap you set
  </Card>

  <Card title="Live browser view" icon="eye" iconType="duotone" color="#1D258E">
    Embed the session so your user watches the purchase happen
  </Card>

  <Card title="Ask only when needed" icon="comments-question" iconType="duotone" color="#A24EC9">
    Prefill identity, shipping, and intent; the agent asks the user only for what is missing
  </Card>
</CardGroup>

## How It Works

<Steps>
  <Step title="Start a run">
    Send any starting URL and the maximum the checkout may spend. Add an optional task when the URL alone does not identify the product, variant, quantity, or other purchase preferences.
  </Step>

  <Step title="Follow and steer the agent">
    Poll the run for its next required action, and read or stream its messages for the complete conversation. Your app can answer forms, authorize a secure card credential, provide a protected password, or send a text message to steer the agent at any time.
  </Step>

  <Step title="Read the result">
    The run ends with a receipt, a safe blocked outcome, or a clear failure reason. Cancel at any point before completion.
  </Step>
</Steps>

## Get Started

<CardGroup cols={2}>
  <Card title="Quickstart" icon="bolt" color="#E6DB63" href="/agents/agent-checkouts-quickstart">
    Start a run, handle each input type, steer the agent, and read the result
  </Card>

  <Card title="Try the live demo" icon="rocket" iconType="duotone" color="#ADD8E6" href="https://agent-checkouts.demos-crossmint.com" target="_blank" rel="noopener">
    See the full flow without setting anything up locally
  </Card>
</CardGroup>

## Guides

<CardGroup cols={2}>
  <Card title="Provide Purchase Context" icon="address-card" href="/agents/payment-flows/agent-checkouts-buyer-context">
    Prefill identity, shipping, and intent with buyer profiles and the request
  </Card>

  <Card title="Set the Browser Location" icon="globe" href="/agents/payment-flows/agent-checkouts-browser-location">
    Request the country where the checkout browser appears to be located
  </Card>

  <Card title="Choose a Payment Method" icon="credit-card" href="/agents/payment-flows/agent-checkouts-payment-method">
    Supported methods, and how to pass a card safely
  </Card>

  <Card title="Improve Merchant Success Rate" icon="compass" href="/agents/payment-flows/agent-checkouts-merchant-prompt">
    Tell the agent what you already know about a merchant's checkout
  </Card>

  <Card title="Buy from Authenticated Stores" icon="user-lock" href="/agents/payment-flows/agent-checkouts-browser-profiles">
    Check out inside the user's merchant account and reuse the login
  </Card>
</CardGroup>

## API Reference

<CardGroup cols={3}>
  <Card title="Agent Checkouts" icon="brackets-curly" href="/api-reference/agent-checkouts/create-agent-checkout">
    Create, read, respond to, and cancel checkouts
  </Card>

  <Card title="Buyer Profiles" icon="brackets-curly" href="/api-reference/agent-checkouts/create-buyer-profile">
    Reusable name, contact, and shipping details
  </Card>

  <Card title="Browser Profiles" icon="brackets-curly" href="/api-reference/agent-checkouts/create-browser-profile">
    Saved merchant logins for later checkouts
  </Card>
</CardGroup>

## FAQs

<AccordionGroup>
  <Accordion title="Which payment methods can a checkout use?">
    Any method the merchant accepts: a Crossmint Agent Card, an agent card from another provider such as Ramp or Link, a card already saved in the user's account at the merchant, Apple Pay, Google Pay, PayPal, or a local method such as Shop Pay, bank transfer, or Bizum. See [Choose a Payment Method](/agents/payment-flows/agent-checkouts-payment-method).
  </Accordion>

  <Accordion title="How does my app follow the checkout?">
    Poll the run to read its current status and `requiredAction`. Read or stream `/messages` when your UI needs the complete conversation, progress, activity, input requests, or result. The [quickstart](/agents/agent-checkouts-quickstart) walks through both views.
  </Accordion>

  <Accordion title="Can I pass card details when I create the checkout?">
    No. When the run asks for payment, create an order intent for the same buyer and amount, then send only its `orderIntentId` in an input response. Raw card details never belong in the run request or message history. See [Choose a Payment Method](/agents/payment-flows/agent-checkouts-payment-method).
  </Accordion>

  <Accordion title="Does the checkout stop to ask the user questions?">
    It moves to `awaiting_input` whenever it needs information or authorization. Form requests use a JSON Schema, payment requests take an order intent ID, and protected requests take a protected input ID. Protected requests currently support merchant passwords. You can pre-answer many ordinary questions with a [buyer profile and task](/agents/payment-flows/agent-checkouts-buyer-context).
  </Accordion>

  <Accordion title="Can the user change the request after the run starts?">
    Yes. Send a text part to `/messages` at any time before the run finishes. Use it to change preferences, answer a conversational question, or redirect the agent without starting over.
  </Accordion>

  <Accordion title="Can the agent buy inside the user's account at a merchant?">
    Yes. A [browser profile](/agents/payment-flows/agent-checkouts-browser-profiles) keeps the browser state from a login so later checkouts start signed in, with access to saved addresses, payment methods, and member pricing.
  </Accordion>

  <Accordion title="Can I call the API from the browser?">
    Yes. Every endpoint accepts a server-side key, or a client-side key plus the signed-in user's JWT from your auth provider. The [quickstart](/agents/agent-checkouts-quickstart) shows both header sets.
  </Accordion>
</AccordionGroup>
