Prerequisites
- Agent Checkout integration: Complete the Agent Checkouts quickstart so your application can start a run, observe it, and send messages.
- Server-side API key: Use a production key with
agent-checkouts.create,agent-checkouts.read,agent-checkouts.update, andagent-checkouts.browser-profiles.createscopes. - Client-side API key: Add
protected-inputs.createto the key used on the page that collects a password. Addprotected-inputs.readif your integration lists protected inputs andprotected-inputs.revokeif it revokes them. In staging, all scopes are included by default. - User authentication: Authenticate that page with a user JWT for the same user as the checkout run. See Crossmint Auth or configure an external identity provider.
- Secure React surface: Use a page in your application where you can render
CrossmintProtectedInput.
x-crossmint-user-id on every request.
Sign In Once and Reuse the Session
1
Create a browser profile for the user
Create one profile and store its The response contains metadata only. It does not return cookies, tokens, or other browser state.A user can have one browser profile. Reuse that profile rather than creating one for each merchant.
id with the user in your system. The optional label is only for your own bookkeeping.2
Attach the profile to a checkout run
Pass the profile as You can also include
browser.profileId when you start a run. The first run starts without a saved merchant session, so tell the agent to sign in before it buys.browser.location in the same object when the checkout should run from a particular country. See Set the Browser Location.Observe the run as described in the quickstart. The agent can request an email or username with a normal form request. It requests a password with a protected input request, which you handle in Submit a Password Securely.3
Complete the first signed-in checkout
Answer each request by its
requestId, then continue observing the run. After the checkout finishes cleanly, the merchant’s session is stored in the browser profile.The profile itself does not report what happened during a checkout. Read the run and its messages to confirm whether the agent signed in, encountered another verification step, or completed the purchase.4
Reuse the profile on later runs
Pass the same The run loads the saved session before it navigates. If the merchant has expired the session or requires the user to sign in again, the agent sends new input requests. Handle them the same way as the first run.
browser.profileId on the next checkout for this user.Submit a Password Securely
1
Detect the protected input request
The run moves to
awaiting_input and exposes the request as requiredAction.request when you read the run and as an input_request part when you list or stream messages.Dispatch on interaction.kind === "protected". The request contains safe metadata about the credential and merchant, never the password itself.purposeis the kind of protected value requested. Today it is always"password".merchant.domainis the merchant where the password may be used. Agent Checkouts can use it on this domain or its subdomains.
2
Send the user to a secure input surface
Choose the handoff that fits your integration:
Associate the page with the run and
requestId in your own application state. The user’s JWT, checkout run, and protected input must all represent the same user.If you cannot provide a secure interactive surface, ask the agent to use a guest checkout with action: "alternative", or refuse the request with action: "decline". Never ask the user to send a password in chat.3
Collect the password
Render See
CrossmintProtectedInput from @crossmint/client-sdk-react-ui. Build merchantUrl from the request’s merchant.domain, and keep the protectedInputId returned by onCreated.CrossmintProtectedInput in the React SDK reference under Agents → API Reference → React SDK → Components for all props and onError codes.4
Submit the protected input ID
Send one The accepted response resumes the run. Continue observing it until it completes, asks for another input, or stops.Answer before the request’s
input_response part that references the request’s requestId. The message contains the ID, not the password.expiresAt. If it expires, collect the password again for the new request.Protected Input Requirements
- Same project and user — render the component with the same Crossmint project, environment, and signed-in user as the checkout run.
- Matching merchant — build
merchantUrlfrom the request’smerchant.domain. - Enough lifetime — the protected input must remain valid until the checkout finishes. It lasts 24 hours by default and at most 7 days. Set
expiresAtto the shortest practical duration.
How the Password Stays Protected
- The password does not reach your application code. The user types into a field hosted by Crossmint. Your page receives only the
protectedInputId. - Sensitive response data is sealed. After Crossmint accepts the response, subsequent run and message reads report that protected input was provided and whether it was applied. They do not return the password or ID to the model or message history.
- The agent cannot read the password. It fills and submits the merchant’s password field in one operation, then clears the field.
- The password is merchant-bound. A password collected for
shop.example.comcan be released on that domain or a subdomain such asaccounts.shop.example.com, never an unrelated domain.
Recover from a Failed Sign-In
If Agent Checkouts cannot use the protected input, it retries when safe or sends a new protected input request. Answer the newrequestId; do not reuse a response from an earlier request.
When the merchant rejects the password, Agent Checkouts does not submit the same password again. It sends a new protected input request.
How Browser Profiles Stay Protected
- The profile API returns metadata only. Cookies, tokens, and other saved browser state are not returned.
- Saved browser state is not added to a model prompt. It is loaded only into the browser for that user’s checkout.
- Each run has its own browser. The browser is released when the run finishes.
- Card details are not stored in a browser profile. Use a payment method described in Choose a Payment Method.
Manage a Browser Profile
Browser profile routes live underhttps://www.crossmint.com/api/unstable/agent-checkouts/browser-profiles and are documented with the Agent Checkouts API reference.
- A user can have one profile. Creating another returns
409. - Requesting a profile owned by another user returns
404, so its existence cannot be probed. labelis the only editable field.- Deleting a profile irreversibly erases its saved browser state. Runs already using it continue, and erasure finishes after they end.
Next Steps
Choose a Payment Method
Pay with an Agent Card, a merchant-saved card, or a local method
Provide Purchase Context
Give the checkout task more context and steer it while it runs

