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, andagent-checkouts.cancel. Add theagent-checkouts.buyer-profiles.*andagent-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, andprotected-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-idheader with the user ID from the user’s JWT: the claim that you set for your auth provider in the Console,subby default. The checkout and the user’s saved card then belong to the same user.
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
Set a Low Spending Cap
Setconstraints.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
A request gets 403 "Agent Checkouts is only available in production"
A request gets 403 "Agent Checkouts is only available in production"
The request uses a staging API key. Create a production server key with the Agent Checkouts scopes.
A server key cannot create an order intent
A server key cannot create an order intent
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 cannot use the order intent
The checkout cannot use the order intent
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).Saving a card returns payments:payment-method.card-limit-reached
Saving a card returns payments:payment-method.card-limit-reached
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

