Skip to main content
Agent Checkouts buys on any website for your user. Choose how to start:

Try it out

See how Agent Checkouts handles a merchant. Purchases are real

Call the API

Start a checkout from your server with an API key, in about 5 minutes

Add it to your app

Paste one prompt into Claude Code, Cursor, or Codex

Call the API

Start a checkout from your server, follow it, answer its questions, and read the exact total at the payment step. Then cancel it, so that nothing is bought.

Prerequisites

  • Production server key — a key with the agent-checkouts.create, agent-checkouts.read, agent-checkouts.update, and agent-checkouts.cancel scopes. Create it in the Crossmint Console, or ask your coding agent to create it with the Crossmint MCP server.
  • A user ID — any stable ID of your user, for example user-123. Send it in x-crossmint-user-id: each checkout belongs to that user.
Agent Checkouts uses production API keys. A staging key gets 403 with the message "Agent Checkouts is only available in production". See Test Agent Checkouts.
1

Start a checkout

Send a link to a product, the task, and the maximum amount to spend. Replace the link and the task with a real product. Set maxCost a little above the price, so that the checkout can reach the payment step.
The response has the checkout’s runId.
2

Read the checkout

Read the checkout every 2 seconds, until it waits for an answer (awaiting_input) or ends:
When status is awaiting_input, requiredAction.request.interaction holds the question. For every status, see Statuses, Results, and Errors.
3

Answer the questions

This step is optional: the checkout asks only for what it does not know, such as the email or the shipping address. When interaction.kind is "form", send one answer for each field in interaction.fields, by its key. Use the question’s requiredAction.requestId and a new message ID:
The checkout can still show the question that you answered for a short time after it accepts the answer, so the read skips that requestId. Repeat until the checkout reaches the payment step. To ask fewer questions, give the details up front in a buyer profile. See Configure a Checkout. For passwords and other protected fields, see Answer Questions.
4

Read the total and cancel

At the payment step, interaction.kind is "payment". When interaction.amount.kind is "exact", interaction.amount.value is the total, with shipping and tax:
Do not answer the payment request. Cancel the checkout, so that nothing is bought:
The cancel request returns 202 Accepted, and the status becomes cancelled.
To buy, answer the payment request instead of cancelling. To pay with your user’s own card, your app saves the card and the user approves the payment in your frontend: see Add It to Your App. For other methods, such as a card saved at the merchant or Shop Pay, see Pay for a Checkout.

Add It to Your App

Open your app’s repository in Claude Code, Cursor, or Codex, and paste this prompt. Your coding agent reads these docs and asks you how your users pay: with their own cards through Agent Cards or not, and when they save a card and approve a spending limit. Then it adds the checkout, its questions, and the payment step to your app. Connect the Crossmint MCP server to your coding agent first: then it also creates your production project, registers your auth provider, and creates your API keys.
Prompt

Launching in Production

You already use production keys. Before you serve users:
  1. Stream the checkout’s messages instead of reading the checkout every 2 seconds. See Stream Updates.
  2. Collect passwords and codes with CrossmintProtectedInput. See Answer Questions.
  3. Handle every final status and code. See Statuses, Results, and Errors.
  4. Save the user’s name and shipping address in a buyer profile, so that the checkout asks less. See Configure a Checkout.
If the response to a create request is lost, read List Checkouts before you create another checkout.

Learn More

How Agent Checkouts Works

The parts, the questions, and the statuses

Test Agent Checkouts

Test at low cost, and clean up after

Pay for a Checkout

Pay with an order intent, Shop Pay, or another method

Common Questions

Merchants, cost, and what happens after a purchase