Skip to content

Add Crossmint Agent Checkouts as an optional way to buy - #34

Open
aadopii wants to merge 2 commits into
browserbase:mainfrom
aadopii:feat/crossmint-agent-checkouts
Open

aadopii wants to merge 2 commits into
browserbase:mainfrom
aadopii:feat/crossmint-agent-checkouts

Conversation

@aadopii

@aadopii aadopii commented Oct 28, 2026

Copy link
Copy Markdown

Adds Crossmint Agent Checkouts to Bell as an optional way to buy. One call takes a product URL, a sentence and a spending cap. Crossmint picks the fastest path for that store (merchant API, agent protocol, or its own checkout browser) and returns a run with status snapshots. Bell answers the human questions and gets a receipt. It works at any store, with the user's own card, worldwide.

Nothing in the Link integration, the browser runtime or the hooks changes. Unset the variables and both tools answer not_configured.

Two tools

crossmint_checkout starts a run, polls it, answers forms, declines, cancels. crossmint_pay pays.

Payment runs through Eve's approval gate, approval: always(). Eve halts and the person reads "Pay 12.49 USD to shop.example with your Crossmint order intent?". After the yes, the server fetches the live request from Crossmint and compares amount, currency, merchant and the cap the run started with. Any difference pays nothing and returns the reason. Payments need an authenticated sender, the same rule that keeps the web demo away from Linq wallets, and only the person who started the run can approve.

Money comes from an order intent approved in Crossmint beforehand. A saved card, an amount, a merchant scope, an expiry. The card can be a Crossmint agent card, a card on file, or an agent card from another provider. The card number never reaches Bell or the model.

Policy and boundary

CROSSMINT_ALLOWED_MERCHANTS follows the Baselayer origin rules. CROSSMINT_MAX_COST caps any single run. Both are checked before the run exists, because Crossmint bills a run that ends blocked. CROSSMINT_BUYER_PROFILE_ID attaches a saved profile so most checkouts skip the address questions.

Key, buyer id and order intent id never enter tool arguments or output. Every snapshot is projected to an allowlist before Eve stores it. protected fields cannot be answered by the model. Runs are registered per conversation in process memory, like the Link sandbox request set.

Open for review

The poll blocks up to ninety seconds. The registry is in memory, so an unfinished run after a restart is reconciled in the Crossmint console. Link's real mode solved the same thing with Postgres and I'd follow that pattern if wanted.

Tests

375 pass on Node 24 with typecheck, lint and the full build. The new tests never call Crossmint. They pin request bodies to the documented API, prove no provider body leaks, exercise the allowlist and the ceiling, run the payment cross-check through every refusal reason, and cover polling, timeout and cancellation.

Thirteen files. Two tools, one shared helper, three server modules, one test file, one doc, one demo script, and a row each in the README, docs/repository.md, .env.example and agent/instructions.md.

Two tools let Bell buy through Crossmint Agent Checkouts: crossmint_checkout
starts a run from a product URL, a plain-language task and a spending cap,
answers form questions and declines or cancels; crossmint_pay settles the
payment request with the operator's order intent.

Payment goes through Eve's tool approval rather than a confirmation in chat.
crossmint_pay is declared with approval: always(), the prompt shows the
amount, currency and merchant the model put in the call, and after approval
the server compares those with the live Crossmint request and with the cap
the run was created under before paying. Payments need an authenticated
sender, and only the requesting principal can approve.

Operator policy is checked before a run is created, so a refused request is
never billed: an optional per-checkout ceiling (CROSSMINT_MAX_COST) and an
optional merchant allowlist (CROSSMINT_ALLOWED_MERCHANTS). A saved buyer
profile (CROSSMINT_BUYER_PROFILE_ID) lets checkouts skip shipping and
contact questions.

The API key, buyer id, buyer profile and order intent id stay on the server.
Each snapshot is projected to a metadata allowlist before Eve can persist it,
and a conversation can only act on runs it started in this process. Link,
the browser runtime and the hooks are unchanged; with the Crossmint variables
unset both tools return not_configured.
One tool starts a checkout at any store with a product URL, a sentence and a
spending cap, then answers the forms. A second tool pays after the person
approves the exact total in Eve, and the server checks that total, the
currency, the merchant and the cap against Crossmint's live request before
paying. The card number never reaches Bell or the model. Nothing changes
unless the Crossmint variables are set.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant