task. If the agent needs a card credential, it pauses and sends a typed payment request for your application to authorize.
Your agent runtime can run on a server and communicate through any user channel, including a website, native app, messaging app, or voice assistant. The user only needs a secure application surface when they must authorize or verify the card.
Prerequisites
- Agent Checkout integration: Complete the Agent Checkouts quickstart so your application can start a run, observe it, and send messages.
- Agent Card setup: To use an Agent Card, save the user’s card, register it, and be ready to create an order intent.
- Consistent user identity: Use the same Crossmint project, environment, and user identity for the checkout run and its order intent.
Choose the Method in the Task
Describe the user’s preferred method when you start the run. Be specific enough that the agent does not have to infer which option to select.The task selects the method. It does not authorize a charge. Only answer a typed payment request when the agent is ready to pay.
Authorize an Agent Card
1
Detect the payment request
The run moves to
awaiting_input and exposes the request in both places you can observe a run:requiredAction.requestwhen you read the run- an
input_requestmessage part when you list or stream messages
interaction.kind === "payment". The request contains safe charge metadata, not card details, an iframe URL, or an order intent ID.methodis the method this request accepts. Today it is always"card".amount.valueis a decimal string andamount.currencyis an ISO 4217 code.kind: "exact"is the verified payable total;kind: "maximum"is the run’s cost ceiling.merchant.domainis the merchant where the credential will be used.
2
Create the order intent
Create the order intent in your authenticated application with a production client-side key that has
order-intents.create and order-intents.read scopes. Send the JWT for the same user who owns the saved card and the checkout run.Use the exact amount from the payment request, set a short expiration, and omit merchant. Agent Checkouts binds the card credential to the merchant when it requests it.YOUR_PAYMENT_METHOD_ID is the ID returned when you save and register the user’s card. For the complete request and response, see Create an Agent Card.3
Verify a card rail when required
Inspect For a web or native application, show verification inline or in a webview. For a messaging or voice integration, send the user to an authenticated page in your application and resume the conversation after the rail becomes active.
orderIntent.rails for a rail that includes "card" in credentialFormats:- If a card-capable rail has
status: "active", continue to the next step. - If the available card-capable rail has
status: "pending_verification", follow Verify the Selected Rail to renderOrderIntentVerificationin your authenticated application. - If the
encrypted-cardrail hasstatus: "pending_cvc_recollection", follow Recollect the CVC before fetching the order intent again. - If every card-capable rail has
status: "error", ask the user for another registered card.
4
Submit the order intent ID
Send one You can instead send
input_response part that references the request’s requestId. Do not send card numbers, expiration dates, or security codes.action: "alternative" with text such as "Pay with Shop Pay instead", or action: "decline" to refuse the charge. See Send Agent Checkout Message for the complete schema.Answer before the request’s expiresAt. If it expires, observe the run for a new request and answer its new requestId.5
Continue observing the run
The accepted response resumes the run. Continue streaming messages or reading the run until it completes, asks for another input, or stops.If the merchant total changes or the authorization cannot be used, the agent sends a new payment request. Answer the new
requestId; do not reuse a response from an earlier request.Connect the Request to Your User Channel
Keep the checkout protocol separate from the surface where the user authorizes the purchase:
The agent runtime submits only the
orderIntentId. The channel does not need to display the checkout browser or collect card data.
How Card Data Stays Protected
- The card does not pass through your backend or the checkout control plane. The user enters it in a Crossmint-hosted form when you save it. Your application refers to it by
paymentMethodIdandorderIntentId. - Sensitive response data is sealed. After Crossmint accepts the response, subsequent run and message reads report that authorization was provided and whether it was applied. They do not return the order intent ID or card details to the model or message history.
- The credential is scoped to the purchase. Agent Checkouts requests a card credential only when it is ready to pay, bound to the authorized amount and merchant domain. It fills the merchant’s card fields without reading them back.
Recover from an Authorization Error
If Agent Checkouts cannot use the order intent, theapply_payment step fails with a typed code and the agent sends a new payment request. Fix the cause, then answer that new request.
If the merchant declines the card, the checkout ends as
blocked with merchant.payment_declined.
Next Steps
Create an Agent Card
Create the order intent and verify its selected rail
Buy from Authenticated Stores
Reuse merchant sessions and answer password requests securely

