Software that can pay changes what software can be: an agent that holds a budget and answers 402 challenges can buy its own API calls, its own data, its own compute. No contracts, no invoicing, no human in the loop: a price, a signature, a retry.
This guide wires an agent into U.CASH payments: the key pair, the 402 flow, the server side, and the patterns that keep a budgeted agent from misbehaving.
Every step, in order.
The agent's wallet is its money: generate a key pair, fund it with the assets it will spend, and scope the balance to a budget. The key is the agent's entire identity on the payment layer.
When a server answers 402 Payment Required with a price and a payment address, the agent builds the transaction, signs, pays, and retries the original request with proof. The SDKs wrap the whole handshake.
On the server side, answer unauthenticated requests with a 402 and a payment request: amount, asset, destination. Verified payment releases the response. Per-request, per-call, per-token: pricing becomes code.
Cap the agent's spend per period, per counterparty, and per task. The wallet enforces what code forgets: a runaway loop meets an empty key, not an unlimited card.
Every payment is an on-chain transaction with a hash. Agent ledgers reconcile themselves: what was spent, for what, provable after the fact.
The interesting failure modes are all budget-shaped. An agent optimizing a metric will happily pay infinity for marginal gains unless the budget curve stops it; tie spend caps to task value, log every 402 answered with its purpose, and prefer per-call pricing to subscriptions so a wedged agent idles cheap instead of billing forever. The non-custodial key model is the safety architecture: exposure equals the funded balance, nothing more.
Accept Bitcoin, Ethereum, stablecoins and 53 more assets at checkout in minutes: connect…
Swap any asset for any other across 34 networks: connect a wallet, pick the pair, review…
Three ways to get UCASH, the U.CASH network token: card or bank through the partner ramp,…
Six guides, one platform, every rail non-custodial.