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.

Any coinBTC, ETH, USDT, Sol, Tron, UCASH, custom tokens
Non-custodialfunds go straight to your wallet
Two-sidedbuy & sell with one account

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.

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

BTC (+Lightning), ETH + all ERC-20s, USDT/USDC, Solana, Tron, XRP, Monero, UCASH, custom tokens. Anything with an address.

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.

Quickstart

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

1 · Sign up + activate

# register (wallet-first; no email loop)
curl -X POST https://agents.u.cash/v1/signup \
  -H 'Content-Type: application/json' \
  -d '{"email":"[email protected]","password":"longpass"}'
# -> {"response":{"api_key":"…","activated":false}}

# top up >= $1 to activate (pays + activates on confirmation)
curl -X POST https://agents.u.cash/v1/top-up \
  -H 'X-Api-Key: $KEY' -d '{"amount":1}'

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 (wallet-first)
POST/v1/top-upkey≥$1 checkout; activates the account on confirmation
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)

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

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

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/agents/mcp/server.php"],
      "env": { "UXC_API_KEY": "your_key" }
    }
  }
}

SDKs (zero-dependency)

# Python
pip install agents-u-cash

# JavaScript
npm install agents-u-cash
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