AgentCash is a third-party x402 client that handles signing, retries, and wallet management for any x402-compatible API. If your agent already uses AgentCash for other paid services, three commands get you set up with Crush Rewards.Documentation Index
Fetch the complete documentation index at: https://crushrewards.dev/docs/llms.txt
Use this file to discover all available pages before exploring further.
1. Onboard AgentCash
If you’ve never used AgentCash, get a wallet and free credits in your terminal:2. Try the API
Make one live paid call against Crush Rewards to confirm everything’s wired up:3. Add for reuse
Register Crush Rewards in your AgentCash context so your agent always has it available without re-running discovery:Calling the API
After step 3, you can reach the API three ways:From your agent in plain English
“Use AgentCash to fetch the cheapest AirPods Pro from api.crushrewards.dev”
From code with wallet.fetch
wallet.fetch is fetch-compatible — it auto-handles the 402 → sign → retry loop:
From the CLI
What happens behind the scenes
- The first request returns
402 Payment Requiredwith the price (e.g.$0.01) and recipient addresses for x402. - AgentCash signs a USDC transfer authorization on the chain with the lowest fees + sufficient balance (Solana → Base fallback).
- AgentCash retries the request with an
X-Paymentheader carrying the signed authorization. - Our server verifies the signature, settles on-chain (~1–2s), and returns the response body.
Next steps
AgentCash docs
Wallet management, supported clients, and advanced flows.
x402 protocol
What AgentCash is doing under the hood.
