HTTP 402 · non-custodial · multi-coin

Agents that get paid.

Non-custodial crypto payments for AI agents. Buy and sell over a single HTTP 402 challenge, in any coin - Bitcoin, EVM, stablecoins, Solana, Tron, and more. The 402 Online Protocol, live.

~40 coins + 20 chainsBTC, ETH + EVM L2s, Solana, Tron, USDC-on-Base, UCASH, + custom tokens
Non-custodialfunds go straight to your wallet
Two-sidedbuy & sell with one account
$5 free creditget up to $2,500 USD in transactions when you verify your email

What is agents.u.cash?

The agent + merchant surface for the 402 Online Protocol - a non-custodial way for AI agents, humans, and merchants to pay and be paid over plain HTTP.

A buyer requests a priced resource; the server answers HTTP 402 with a list of every way to pay (accepts[]) - one entry per accepted coin. The buyer picks one, pays the seller's own wallet the exact amount. The platform detects the payment on-chain and settles automatically (within a few minutes). To settle instantly, the buyer can optionally POST the transaction hash to /v1/verify. No cryptographic proof is needed; the chain itself is the proof. No one in the middle holds funds.

An AI agent can both sell (create priced resources, get paid to its own wallet) and buy (pay for others' resources) - and drive both sides as MCP tools inside Claude or any MCP client.
agents.u.cash is the API; pay.u.cash is the door. Every resource returns a checkout_url and every payment request returns a url - both are the 402 door on pay.u.cash (/checkout/ + /id/). A human opens the HTML checkout; an agent fetches ?agent=1 for the JSON manifest; an x402 client pays with an X-PAYMENT header. The /r/{res_id} link is a back-compat alias of /checkout/.
Exact amount vs dust. The platform matches the buyer's on-chain transfer to the exact amount + receive address it issued. Save 3+ addresses for a coin (comma-separated) and each buyer gets a unique address, so the door demands the exact amount (500.00000000). With one address (reused), the door adds a tiny dust in the last decimals (500.00004180) so two concurrent same-amount payments to that address stay distinguishable - the buyer pays effectively the listed amount. For a literal token price (asset + asset_amount), save 3+ addresses for exact mode.

Capabilities

Everything an agent or merchant needs to charge for - and pay for - digital goods, without custody.

Sell

Price a resource in fiat; offer every coin you can receive. Buyers pay your wallet. HMAC-signed webhooks on settlement + a settlement ledger.

Buy

Fetch a 402 door, pick any coin, pay the exact amount - the platform auto-detects it on-chain and settles. Optionally POST the tx hash to settle instantly. No seller key needed - the challengeId authorizes; on-chain confirmation gates settlement.

Multi-coin + x402

~40 native coins: Bitcoin (+Lightning), Ethereum, Solana, Tron, XRP, Doge, Monero, Polygon, Avalanche, BNB, + 15 EVM L2s (Base, Arbitrum, Optimism, Linea, Mantle, Berachain, Sonic, Unichain, World, Monad, Plasma, Abstract, Scroll, Ink, Hyperliquid); USDT (3 chains), USDC, UCASH; plus custom tokens on 20 chains (ERC-20 / BEP-20 / Base-20 / ... / TRC-20 / SPL). Plus x402: gasless USDC-on-Base via EIP-3009, so standard x402 clients pay unchanged.

Non-custodial

Funds move direct buyer→seller - the platform never touches the payment. The fee is a separate prepaid credit the seller prepays; no intermediary ever holds the transaction. Not a money transmitter.

Human oversight

The human behind each agent gets a full dashboard on pay.u.cash to audit, track, and analyze every transaction. Autonomy plus transparency.

Agent-native

API-key auth, idempotent verify, settlement history, and an MCP tool surface + JS/Python SDKs.

Human-friendly

The 402 door serves a payable HTML page (addresses, exact amounts, QR codes) to browsers - and JSON to machines. One link works for both.

UCP checkout + discovery

Each merchant publishes a machine-readable catalog (/catalog.json, schema.org) + a UCP profile (/.well-known/ucp). Buyers create multi-item checkout sessions (mixed-currency carts) via /checkout-sessions, with AP2 mandate authorization + RFC 9421-signed responses. Non-custodial; settles on our detect + redirect rails.

System architecture

Agents is the interaction layer: API, SDKs, MCP, and the 402 door. Settlement runs through pay.u.cash, and funds always move direct buyer to seller - the platform never holds them.

Clients JS SDKnpm @ucash/agents Python SDKpip agents-u-cash MCP server76 tools, stdio REST / OpenAPI 3.1/openapi.json agents.u.cash - API + 402 door /r/{res_id} 402 doorHTTP 402 + accepts[] + paymentRequirements[] WWW-Authenticate: x402 - X-PAYMENT proof header /v1/resources - /v1/walletsprice a resource, set receive addresses UCP /checkout-sessions - /catalog.json - /.well-known/ucp Three payment rails, one door Detect pay + auto-detect on-chain ~40 coins + custom tokens exact vs dust amounts Redirect cards your own card processor checkout in browser Exact gasless USDC on Base EIP-3009 + funded relayer /v1/exact-verify -settle -relay pay.u.cash - settlement on-chain detectionreads the chain, matches exact amount + address HMAC webhook + ledgeridempotent, replayable; fee from prepaid credit On-chain: Buyer wallet -> Seller wallet (direct) non-custodial - the platform never touches the payment Guardrails: per-caller spend caps - OFAC sanctions screening - request expiry - rate limits

Quickstart

Become a seller in four calls. Base URL: https://agents.u.cash

1 · Sign up + activate

# register (free + instant; works at $0)
curl -X POST https://agents.u.cash/v1/signup \
  -H 'Content-Type: application/json' \
  -d '{"email":"me@agent.dev","password":"longpass","agreed_to_terms":true}'
# -> {"response":{"api_key":"…","activated":false}}

# your account works immediately at $0. (Verify your email any time
# for $5 free credit, up to $2,500 in transactions; POST /v1/top-up adds more later.)

2 · Set a wallet + sell

# set your receive address (where buyers pay you)
curl -X POST https://agents.u.cash/v1/wallets \
  -H 'X-Api-Key: $KEY' -d '{"asset":"btc","address":"bc1q…"}'

# create a priced resource
curl -X POST https://agents.u.cash/v1/resources \
  -H 'X-Api-Key: $KEY' -d '{"amount":0.05}'
# -> {"response":{"res_id":"res_…"}}
# share:  https://agents.u.cash/r/{res_id}
Card rail (optional): to also accept cards, POST /v1/stripe with your own Stripe keys (the key + product are verified first), then register the returned webhook endpoint in your Stripe dashboard. Buyers then get a card entry in accepts[] alongside the coins; card payments settle direct to your Stripe account.

3 · Buy (a buyer pays for a resource)

# fetch the 402 door (no key needed)
curl https://agents.u.cash/r/res_… | jq '.response.accepts[0]'
# -> {"scheme":"detect","asset":"btc","payTo":"bc1q…","amount":"16230","challengeId":"chal_…"}

# pay `payTo` exactly `amount` from your wallet. The platform detects
# the on-chain payment and settles automatically (GET /r/{res_id} ->
# {"settled":true} within minutes) - nothing else required.

# To settle instantly instead, POST the on-chain tx hash (optional):
curl -X POST https://agents.u.cash/v1/verify \
  -H 'Content-Type: application/json' \
  -d '{"challengeId":"chal_…","hash":""}'
# -> {"settled":true} | {"status":"pending","confirmations":0,"required":3}
A browser opening https://agents.u.cash/r/{res_id} gets a payable page with QR codes instead of JSON. Crypto buyers pay a detect entry direct to the seller's own wallet; if the seller connected Stripe (POST /v1/stripe), buyers also get a card (redirect) option.

4 · UCP checkout (a buyer agent creates a cart)

# buyer-side: create a multi-item checkout session (merchant from ?cloud=)
curl -X POST https://agents.u.cash/checkout-sessions?cloud=<merchant-token> \
  -H 'Content-Type: application/json' \
  -d '{"line_items":[{"item":{"id":"res_..."},"quantity":1}],"currency":"USD"}'
# -> {"id":"cs_...","status":"incomplete","line_items":[...],"ap2":{"merchant_authorization":"..."}}

# complete -> mints the per-coin payment challenges
curl -X POST https://agents.u.cash/checkout-sessions/cs_.../complete?cloud=<merchant-token>
# the buyer pays each challenge; the session auto-completes on settlement
# GET /orders/cs_... -> per-item fulfillment status

API reference

Auth: send api_key in the X-Api-Key header (from /v1/signup). Full machine spec: OpenAPI · llms.txt.

Account

MethodEndpointAuthPurpose
POST/v1/signuppublicRegister → api_key; works at $0 (verify email optionally for $5 free credit, up to $2,500 in transactions)
POST/v1/top-upkey≥$1 checkout; adds platform credit (funding)
GET/v1/agentkeyBalance, activation, wallets, webhook, earnings summary
POST/v1/agentkeySet the settlement webhook URL
POST/v1/walletskeySet your receive address for an asset
POST/v1/stripekeyConnect your own Stripe account → card (redirect) rail; key + product verified first
GET/v1/stripekeyMasked Stripe config + the webhook endpoint to register
POST/v1/custom-tokenskeyAdd a custom token (ERC-20/TRC-20/SPL); then /v1/wallets to set its receive address
GET/v1/custom-tokenskeyList your custom tokens
DEL/v1/custom-tokens?code=keyRemove a custom token
GET/v1/settingskeyRead safe settings (confirmations, webhook url+secret, currency, payment prefs, notifications, branding)
PUT/v1/settingskeyPartially update safe settings; webhook.rotate_secret mints a new signing secret
GET/v1/settlementskeyEarnings log (settled/underpaid payments)
GET/PUT/v1/integrationskeyRead/write third-party credentials (Discord, Telegram, BigCommerce, Ecwid, Wix)
POST/v1/account-emailkeyAdd/change the account email (verify for $5 free credit, up to $2,500)
POST/v1/reset-passwordkeyReset the overseer web-login password
POST/v1/resend-verificationkeyResend the email verification link

Sell - the 402 flow

MethodEndpointAuthPurpose
POST/v1/resourceskeyCreate a priced resource → res_id
GET/v1/resourceskeyList resources (or fetch one ?res_id=, with settled state)
POST/v1/challengekeyBuild the multi-coin accepts[] for a resource

Buy - public

MethodEndpointAuthPurpose
GET/r/{res_id}publicThe 402 door → 402 + accepts[] (JSON) or a payable page (HTML); 200 if settled
POST/v1/verifychallengeIdVerify + settle instantly (tx hash) - optional; payment also auto-settles via on-chain detection. Buyer-push, no key needed
POST/v1/exact-verifypublicx402 facilitator verify: pure EIP-3009 signature check (no settle)
POST/v1/exact-settlepublicx402 facilitator settle: the platform relayer submits the gasless USDC-on-Base tx

Rate limits (per IP): signup 10/hr, others 30–60/min, /r/ 120/min. Over → 429 uxc_rate_limited. Errors: {success:false, error_code, message}.

UCP checkout - public (?cloud= or custom domain)

MethodEndpointAuthPurpose
POST/checkout-sessions?cloud=Create a checkout session (multi-item cart, mixed-currency)
GET/checkout-sessions/{id}?cloud=Fetch a session (incomplete -> ready_for_complete -> completed)
POST/checkout-sessions/{id}/complete?cloud=Mint payment challenges; optional AP2 mandate
GET/orders/{id}?cloud=The order (per-item fulfillment status)
POST/catalog/search?cloud=Search the merchant catalog
POST/catalog/lookup?cloud=Batch catalog lookup by id
POST/catalog/product?cloud=Fetch a single product by id

UCP endpoints resolve the merchant from the host or ?cloud=<token>; no X-Api-Key. Responses are RFC 9421-signed (ES256). Rate-limited per IP (checkout 60/min, catalog 120/min, orders 60/min).

For AI agents

agents.u.cash is built for autonomous agents. Drive the whole seller surface as tools, or integrate from code with zero-dependency SDKs.

Human operators: you can also sign in to the full dashboard at https://pay.u.cash/admin with the email + password from signup to see the agent 402 sales, credit balance, and per-sale fee history.

MCP server

Run the stdio MCP server with your API key and Claude (or any MCP client) gets tools: uxc_create_resource, uxc_set_wallet, uxc_list_resources, uxc_get_settlements, uxc_view_door, uxc_verify_payment

// claude_desktop_config.json
{
  "mcpServers": {
    "agents-u-cash": {
      "command": "php",
      "args": ["/path/to/agents/mcp/server.php"],
      "env": { "UXC_API_KEY": "your_key" }
    }
  }
}

SDKs (zero-dependency)

# Python
pip install agents-u-cash

# JavaScript
npm install @ucash/agents
from agents_u_cash import AgentsUCash
agent = AgentsUCash(api_key="…")
agent.set_wallet("btc", "bc1q…")
res = agent.create_resource(amount=0.05)
acc = agent.create_challenge(res["res_id"])

LLM-friendly docs