Skip to main content
Agent Wallet plugs into two commerce patterns. In both, the wallet’s role is the same: sign the payment when asked.
PatternTriggerWhat the wallet does
x402 PaywallAgent hits a paid APIDetects the 402, signs, retries automatically
UCP CheckoutAgent shops at a merchantSigns the x402 authorization when the agent requests it during checkout
Everything else (discovering merchants, browsing catalogs, creating checkout sessions, submitting the credential) is handled by the agent or its platform. This page covers only the parts where Agent Wallet enters.

Declare the Handler

For UCP merchants to know your agent can pay via Prism, your platform’s UCP profile must include the xyz.fd.prism_payment handler.
{
  "ucp": {
    "version": "2026-01-23",
    "payment_handlers": {
      "xyz.fd.prism_payment": [
        {
          "id": "prism_default",
          "version": "2026-01-23",
          "spec": "https://prism-gw.fd.xyz/ucp/prism.md",
          "schema": "https://prism-gw.fd.xyz/ucp/schema.json"
        }
      ]
    }
  }
}
This tells merchants: “this agent can pay with Prism-settled stablecoins.” The spec and schema point to the handler definition so the merchant can validate compatibility.

Authorize the Payment

During a UCP checkout, the merchant returns payment requirements inside the handler’s config: which chains, tokens, and amounts are accepted. Your agent passes this to the Agent Wallet MCP server, and the wallet:
  1. Checks that the agent has sufficient balance on a supported chain
  2. Selects a chain/token pair from the merchant’s accepted options
  3. Signs an ERC-3009 transferWithAuthorization inside the TEE
  4. Returns the signed credential
The agent never sees private keys. The output is a self-contained x402 payment object that the agent submits back to the merchant to complete the checkout.

x402 Paywall

When your agent requests a Prism-protected resource, the server responds with HTTP 402 Payment Required. The wallet handles this automatically: it reads the payment requirements, signs, and retries with proof of payment. No extra work from the agent. For more detail on the x402 protocol, see x402 Payments.

What the Wallet Handles

Across both patterns, the Agent Wallet MCP server is responsible for:
  • Payment signing inside the TEE (private keys never leave the enclave)
  • Chain and token selection from the merchant’s accepted options
  • Balance validation before signing
  • ERC-3009 authorization (the x402 payment primitive)
Your agent handles the merchant interaction. The wallet handles the money.

MCP Server Setup

Connect your agent to the wallet

UCP Merchant Integration

The merchant side of this flow

UCP Agent Integration

Full UCP checkout flow (protocol-level detail)

End-to-End Flow

Both sides of a complete purchase
Last modified on March 24, 2026