Skip to main content
You test Agent Checkouts on real merchants from the first call, because each checkout runs real models and a real browser at a real merchant. Use production keys. The first 1,000 checkouts each month are free, you can test it without buying anything, and you choose what to buy and how much to spend. This guide shows how.

Prerequisites

  • Production project — Agent Checkouts runs on real merchants, so it uses production keys. Create all keys and settings below in one project in the Crossmint Console.
  • Server key — for Agent Checkouts calls from your server. Scopes: agent-checkouts.create, agent-checkouts.read, agent-checkouts.update, and agent-checkouts.cancel. Add the agent-checkouts.buyer-profiles.* and agent-checkouts.browser-profiles.* scopes when you use profiles.
  • Client key — for card and approval calls from your app. Scopes: payment-methods.create, payment-methods.read, payment-methods.update, payment-methods.delete, order-intents.create, order-intents.read, order-intents.revoke, and protected-inputs.create. Add your app’s origins to the key.
  • Sign-in — register the provider that signs in your users, such as Firebase, Auth0, Stytch, or Supabase, under 3P Auth providers. See Bring Your Own Auth.
  • One user ID — with the server key, send the x-crossmint-user-id header with the user ID from the user’s JWT: the claim that you set for your auth provider in the Console, sub by default. The checkout and the user’s saved card then belong to the same user.
Connect the Crossmint MCP server to your AI assistant, and it can create the production project and both keys for you. Ask it, for example: “In production, create a project for Agent Checkouts, a server key with the agent-checkouts scopes, and a web client key for my app’s origin with the payment-methods, order-intents, and protected-inputs scopes.”

What Costs Money

Test Without a Purchase

Test the Card Flow in Staging (Optional)

This step is optional. Agent Cards works in staging. Save a card, register it, approve an order intent, and get a credential with the staging test cards. See Test Agent Cards. Then do the same steps with production keys, for Agent Checkouts.

Change a Cart Only

A checkout that only adds an item to the cart tests the merchant, your questions UI, and your result handling. Nothing is bought. See Manage a Store Cart.

Stop at the Payment Step

Let the checkout go to the payment step, read the total from the payment request, and cancel the checkout. Do not answer the payment request.
cURL
See Check a Price Without Buying for the full steps.

Set a Low Spending Cap

Set constraints.maxCost below the price of the product. The checkout stops before it pays, with the status blocked and result.code: "policy.max_cost_exceeded". This tries your handling of a blocked checkout.

Make Your First Purchase

1

Choose a low-cost product

Choose a product that costs less than 10 USD, from a merchant that sells to your country. Use your own card.
2

Set the spending cap

Set maxCost a little above the product’s price, so that the checkout stops if the total is unexpected.
3

Run the checkout

Answer the questions, approve an order intent, and read the receipt. See Pay for a Checkout.
4

Return or cancel the order

Cancel or return the order with the merchant, under the merchant’s policy. Use result.purchase.receipt.merchantOrderId to find the order.

Clean Up

  • Delete test cards. Saved cards count toward the project’s limit of 50 saved cards. See Cancel Card Access.
  • Cancel unused order intents. An order intent stays usable until it expires or you cancel it.

Common Gotchas

The request uses a staging API key. Create a production server key with the Agent Checkouts scopes.
Order intents accept only a client key with the user’s JWT. A server key gets “Provided API key must be client specific”. Create the order intent in your app, where the user is signed in.
The checkout and the order intent belong to different users. Send x-crossmint-user-id with the user ID claim of the JWT that created the order intent (sub by default).
The project reached its saved-card limit. Delete test cards, or contact our sales team to raise the limit.

Next Steps

Quickstart

Test a merchant with OCA, call the API, or add it to your app with one prompt

Statuses, Results, and Errors

Handle every result of a checkout

Create a Checkout

Review the complete create request schema