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.
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.
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/.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.Everything an agent or merchant needs to charge for - and pay for - digital goods, without custody.
Price a resource in fiat; offer every coin you can receive. Buyers pay your wallet. HMAC-signed webhooks on settlement + a settlement ledger.
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.
~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.
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.
The human behind each agent gets a full dashboard on pay.u.cash to audit, track, and analyze every transaction. Autonomy plus transparency.
API-key auth, idempotent verify, settlement history, and an MCP tool surface + JS/Python SDKs.
The 402 door serves a payable HTML page (addresses, exact amounts, QR codes) to browsers - and JSON to machines. One link works for both.
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.
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.
Become a seller in four calls. Base URL: https://agents.u.cash
# 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.)
# 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}
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.# 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}
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.# 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
Auth: send api_key in the X-Api-Key header (from /v1/signup). Full machine spec: OpenAPI · llms.txt.
| Method | Endpoint | Auth | Purpose |
|---|---|---|---|
| POST | /v1/signup | public | Register → api_key; works at $0 (verify email optionally for $5 free credit, up to $2,500 in transactions) |
| POST | /v1/top-up | key | ≥$1 checkout; adds platform credit (funding) |
| GET | /v1/agent | key | Balance, activation, wallets, webhook, earnings summary |
| POST | /v1/agent | key | Set the settlement webhook URL |
| POST | /v1/wallets | key | Set your receive address for an asset |
| POST | /v1/stripe | key | Connect your own Stripe account → card (redirect) rail; key + product verified first |
| GET | /v1/stripe | key | Masked Stripe config + the webhook endpoint to register |
| POST | /v1/custom-tokens | key | Add a custom token (ERC-20/TRC-20/SPL); then /v1/wallets to set its receive address |
| GET | /v1/custom-tokens | key | List your custom tokens |
| DEL | /v1/custom-tokens?code= | key | Remove a custom token |
| GET | /v1/settings | key | Read safe settings (confirmations, webhook url+secret, currency, payment prefs, notifications, branding) |
| PUT | /v1/settings | key | Partially update safe settings; webhook.rotate_secret mints a new signing secret |
| GET | /v1/settlements | key | Earnings log (settled/underpaid payments) |
| GET/PUT | /v1/integrations | key | Read/write third-party credentials (Discord, Telegram, BigCommerce, Ecwid, Wix) |
| POST | /v1/account-email | key | Add/change the account email (verify for $5 free credit, up to $2,500) |
| POST | /v1/reset-password | key | Reset the overseer web-login password |
| POST | /v1/resend-verification | key | Resend the email verification link |
| Method | Endpoint | Auth | Purpose |
|---|---|---|---|
| POST | /v1/resources | key | Create a priced resource → res_id |
| GET | /v1/resources | key | List resources (or fetch one ?res_id=, with settled state) |
| POST | /v1/challenge | key | Build the multi-coin accepts[] for a resource |
| Method | Endpoint | Auth | Purpose |
|---|---|---|---|
| GET | /r/{res_id} | public | The 402 door → 402 + accepts[] (JSON) or a payable page (HTML); 200 if settled |
| POST | /v1/verify | challengeId | Verify + settle instantly (tx hash) - optional; payment also auto-settles via on-chain detection. Buyer-push, no key needed |
| POST | /v1/exact-verify | public | x402 facilitator verify: pure EIP-3009 signature check (no settle) |
| POST | /v1/exact-settle | public | x402 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}.
| Method | Endpoint | Auth | Purpose |
|---|---|---|---|
| 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).
agents.u.cash is built for autonomous agents. Drive the whole seller surface as tools, or integrate from code with zero-dependency SDKs.
https://pay.u.cash/admin with the email + password from signup to see the agent 402 sales, credit balance, and per-sale fee history.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" }
}
}
}
# 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"])
llms.txt - the full API, flows, concepts, and links in one plain-text file (point an LLM here).accepts[], security model).