## Agent artwork checkout

Any AI agent can use the [public HTTP purchase API](https://mondoir.art/agent-commerce)
directly, regardless of provider or framework. No plugin installation, provider
partnership, browser sign-in or separate Mondoir human approval is required.
Read the [purchase recipe](https://mondoir.art/agents/commerce.md) and
[commerce OpenAPI description](https://mondoir.art/agents/commerce-openapi.json).

### Commerce through MCP

MCP-only clients can connect to [commerce MCP](https://mondoir.art/agent-commerce/mcp)
using stateless Streamable HTTP. Initialize, then tools/list. For protected calls,
follow WWW-Authenticate to protected-resource metadata and the commerce OAuth server.
The host registers its callback, uses authorization-code PKCE S256, stores tokens
privately, refreshes them and attaches Bearer headers. No credentials enter model
tool results. Existing HTTP commerce credentials also work. Authorization provisions
a separate agent identity, not a website account or access to someone else's orders.
It requires no website login or separate Mondoir spending approval.
Start with search_catalogue to find public artwork and any products specifically
available to your authenticated buyer identity. Use the returned identifiers.

Use create_checkout with a stable idempotency_key and a UCP-shaped checkout.
Choose a USDC network from GET /agent-commerce and pass it as mondoir.network
(ACP: metadata.mondoir.network; direct quotes: network). Base is the live default.
Payer addresses must belong to that network. Solana uses x402 with the official
SVM wallet client and a base64 serialized transaction, not EIP-3009 or MPP.
Uncertain Solana payments require finalized receipt reconciliation; never repay
merely because the quote expires. Every network uses the same inventory lock.
Use update_checkout for missing details, complete_checkout without payment for
the challenge, then complete_checkout with payment {type:"x402" or "mpp", proof}
for the signed authorization. Use get_checkout for status, cancel_checkout for
unpaid cancellation, reconcile_checkout_payment or resolve_expired_payment for
uncertain settlement, and rotate_commerce_credential/revoke_commerce_credential
for credential management. HTTP payment status and challenge headers appear in
the tool's JSON text result. A 202 is pending, not completed; do not pay again.

The public catalogue MCP endpoint remains anonymous and read-only. Commerce MCP
uses the same ownership checks, ledger and fulfillment as HTTP checkout.
The host must support MCP OAuth or configured Bearer headers. A wallet-capable
host can submit payment proofs directly. Otherwise complete_checkout returns a
short-lived wallet_checkout_url: give it to the buyer to open in a compatible
wallet browser, then poll get_checkout. Opening the link is not payment.
No wallet private key is accepted by Mondoir tools.

Default tools do not expose registration or secret-returning rotation.
Legacy custom hosts may explicitly opt in with X-Mondoir-Custom-Host: 1, but must
intercept those secret results before model ingestion, encrypt credentials and
redact them from chat/logs. Ordinary hosts should use OAuth instead.
No hosted client is certified by tools/list alone; OAuth does not supply funds
or wallet signing. The optional wallet link lets its owner authorize payment.

### Payment signing

Signing is the wallet/host's responsibility under its owner's spending policy.
Keep keys outside Mondoir and model context. Check chain, native token contract,
recipient, exact atomic amount, expiry and resource against the owned checkout
before signing. Obtain fresh terms; never reconstruct prices from catalogue text.

For x402, payment.proof is the PAYMENT-SIGNATURE header value: standard base64 of
JSON PaymentPayload v2. Use an x402 v2 wallet client and encodePaymentSignatureHeader.
The JSON has x402Version:2, resource and extensions copied unchanged from the
challenge, accepted equal to its selected terms, and payload containing signature
and authorization {from,to,value,validAfter,validBefore,nonce}. Sign EIP-3009
TransferWithAuthorization using the challenge's token domain and chain.

For MPP, payment.proof is the complete Payment-Authorization header:
Payment followed by a space and base64url JSON {challenge,payload}. Preserve the
challenge parsed from WWW-Authenticate. The evm/charge authorization payload has
type:"authorization", from, to, value, validAfter, validBefore, nonce and signature.
Use a compatible MPP EVM wallet client to bind nonce and expiry to that challenge;
do not fabricate a nonce or reuse an x402 signature. See the
[payment handler specification](https://mondoir.art/agent-commerce/payment-handler.md).

MCP completion uses the stable discovery-enabled payment resource. HTTP clients
wanting Bazaar listing must POST https://mondoir.art/agent-commerce/v1/pay with
{quote_id}, not the legacy quote-specific payment URL. The client must echo
resource and extensions unchanged. PayAI admits a new POST listing after a
successful extension-carrying settlement and its catalogue checks, not merely
because tools/list or verification succeeds. Confirm listing status afterward.

Auth.md assertion registration and optional human claims are documented in
[auth.md](https://mondoir.art/auth.md). UCP checkout is advertised at
[the UCP profile](https://mondoir.art/.well-known/ucp); ACP checkout at
[the ACP profile](https://mondoir.art/.well-known/acp.json).
Both use the same native-USDC payment ledger as direct commerce. The
[payment handler specification](https://mondoir.art/agent-commerce/payment-handler.md)
documents progressive carts and MPP evm/charge alongside x402.

### Register an agent

POST https://mondoir.art/agent-commerce/v1/agents with
Content-Type: application/json and body {"name":"your-agent-name"}.
The response returns a bearer credential once. Store it privately and send
Authorization: Bearer <credential> on that account's quote and payment requests,
without browser cookies. Credentials expire after 24 hours. Registration is
self-reported: it does not verify agenthood or grant access to private customer accounts.

### Select, quote and pay

Find published artwork at [Studio](https://mondoir.art/studio) or
[Mondoir Collection](https://mondoir.art/artworks); catalogue MCP/A2A are optional discovery
interfaces, not purchase prerequisites. Use actual returned slugs, not invented ones.
POST https://mondoir.art/agent-commerce/v1/quotes with exactly one of artworkSlug,
shopProductSlug or decorativeArtworkSlug, plus buyerEmail, payer and shipping.
Shipping requires firstName, lastName, address1, city and an uppercase ISO country
code; address2, state, postalCode and phone are optional. Ask for missing buyer
or delivery information before requesting a quote. Never invent these details.
Editions, digital artworks, NFTs, shop products and their options follow the same
availability, price and delivery rules as browser checkout. Select the edition,
variant and quantity when applicable, and provide a delivery wallet for an NFT
if different from the paying wallet.

Use quantity, editionNumber or editionNumbers, variantId and walletAddress as
applicable. Prices are USD; pay only the exact total, token, network and receiving
address in the server quote, including configured shipping and tax. Quotes expire
after ten minutes. Never assume an artwork's displayed price is the all-in total.
When enabled, an unsigned anonymous POST to https://mondoir.art/agent-commerce/v1/pay
with a public artwork quote request also returns 402 plus checkout.access_token
and checkout.quote_id. Keep these private and use them for the authenticated
payment step. An empty probe returns an example quote only: request a fresh
quote with the buyer's actual wallet, email and shipping details before signing.
Never pay a discovery example. Private inventory cannot use anonymous bootstrap.

POST https://mondoir.art/agent-commerce/v1/pay with {quote_id} and the bearer credential
to receive HTTP 402 and PAYMENT-REQUIRED (x402 v2). The agent's authorized wallet
signs the exact EIP-3009 authorization, preserving resource and extensions, then
sends PAYMENT-SIGNATURE to that same endpoint with the same quote_id body.
The returned quote-specific payment_url remains compatible but does not carry
Bazaar discovery metadata.
Never send wallet
private keys or seed phrases to Mondoir.
The agent needs HTTP requests and wallet signing in its runtime; a text-only
client cannot execute payment. The agent's owner determines its spending and
approval policy; Mondoir does not impose an additional approval ceremony.

This deployment accepts native USDC on Base, Polygon, Arbitrum, World Chain, Monad, Solana.
Base is the default.
Only describe those networks as enabled. Support is not proof of a funded test on every chain. Verified payments create normal orders, confirmation emails and artist delivery instructions.

### Track, recover and revoke

GET https://mondoir.art/agent-commerce/v1/quotes/{id} with the same bearer credential
for order.order_id, delivery status, tracking and pending notifications. Do not
claim success until the response contains the confirmed order.
A 202 settlement response means do not pay again: use the quote's reconciliation
endpoint with the existing transaction and poll for recovery.
POST https://mondoir.art/agent-commerce/v1/agents/me/token with {} before expiry to
rotate credentials while retaining history. DELETE the same /v1/agents/me
account endpoint to revoke access. DELETE an owned unpaid quote to cancel it.
Credentials cannot access another agent's quotes or orders.

Artwork ownership does not confer copyright or image-reuse permission.
Respect artist rights and read the [image licence](https://mondoir.art/image-license).
