# PayHumans.ai > PayHumans lets an AI agent get a real-world fiat payment made. The agent funds an order with supported crypto and names a recipient; a person sends the money from their own payment app and collects the crypto once the payment is verified. Built on Peer. Agents use the `payhumans` CLI (npm package `payhumans-ai-cli`, Node.js 22 or newer). Orders settle as USDC on Base in Peer's escrow contract. People fill orders in the Peer mobile app. Rules to hold before you spend anything: - Creating an order does not pay the recipient. It puts crypto in escrow and waits for a person. Only a claim in the FULFILLED state means a fiat payment was verified and USDC was released. - Every command that spends is a preview until you pass `--yes`. Preview first and read `totalSourceInput`, `routes` and `fiatForFullDeposit` (amount times rate: the fiat the recipient gets if the whole order fills). - Signed crypto writes require `--operation-id`. `deposit create --yes` also requires `--max-source-spend`; `return --yes` requires `--min-receive`. Recipient registration moves no crypto and needs no operation ID. Reuse the same operation ID on every retry; a new ID is a new payment. - Retry protection depends on the local journal in `~/.payhumans/operations`. Keep that directory and back it up, and do not use the same wallet from another process or tool while an operation is in flight. Without the journal the CLI cannot tell what was already sent. - The limits bound the route and execution gas, not every cost. L1 data fees, Solana account rent and your own Bitcoin transaction fee are extra. Each limit covers one order, so keep your own total budget. Gas caps are checked against prepared transactions during execution; a preview is not a full gas estimate, and earlier confirmed steps can remain spent if a later step is blocked. - Keys come only from the environment: `PAYHUMANS_SOLANA_KEY` or `PAYHUMANS_EVM_KEY`, or their `_FILE` variants. Never put a key in a command argument, a prompt or a log. No account, API key or Privy login is needed. - Whatever you fund with is converted to USDC on Base before the deposit. The escrow is Peer's contract on Base. There is no escrow on Solana, Ethereum or Bitcoin. - Funded mainnet tests cover Solana USDC/SOL, Ethereum ETH, Base ETH and external-wallet native BTC. Other implemented routes remain untested with funds. A successful quote alone is not a funded test. Wrapped BTC is not accepted. - Recipient validation checks format, not ownership. Confirm the exact handle with the recipient. Fiat sent to a wrong handle cannot be recovered. - Nobody is guaranteed to see or fill an order. 12 platforms can be named in an order, but only 10 can be filled in the Peer mobile app. Unclaimed funds can be withdrawn at any time. You cannot cancel another person's active claim, and should not try to: they may already have sent fiat. - Real fiat payment, proof and payout remain unverified in these PayHumans tests. Start with small amounts. ## Quickstart ```sh npm install -g payhumans-ai-cli # 1. What can be paid, and what can fund it payhumans platforms payhumans routes # 2. Preview an order. Nothing is signed or sent. payhumans deposit create --platform revolut --recipient '' \ --amount 5 --currency USD --rate 0.98 # 3. Same command with an ID, a source spend cap and --yes payhumans deposit create --platform revolut --recipient '' \ --amount 5 --currency USD --rate 0.98 \ --operation-id invoice-1042 --max-source-spend 5.5 --yes # 4. Watch it, then take back whatever was not claimed payhumans deposit show payhumans deposit withdraw --id \ --operation-id invoice-1042-withdraw --yes ``` Results are JSON on stdout. Errors are JSON on stderr with a non-zero exit code. `payhumans --help` is the authority for the version you installed. ## Agent docs - [Full agent guide](https://payhumans.ai/llms-full.txt): the complete documentation as one Markdown file. Read this before creating an order. - [Machine-readable reference](https://payhumans.ai/agent-guide.json): commands, flags, environment variables, funding routes and platforms as JSON. - [Quickstart](https://payhumans.ai/docs#quickstart): install and run the whole flow. - [Wallets and keys](https://payhumans.ai/docs#keys): environment variables; no account needed. - [Balances](https://payhumans.ai/docs#balances): what the funding wallet and the Base account must hold. - [Platforms and recipients](https://payhumans.ai/docs#platforms): recipient identifier formats, validation, and which platforms need the recipient to register first. - [Funding routes](https://payhumans.ai/docs#routes): which crypto can fund an order, and which routes are tested. - [Preview and cost](https://payhumans.ai/docs#preview): source spend, route fees, network fees and the limits you set. - [Create an order](https://payhumans.ai/docs#create): required flags, what happens in order, partial fills. - [Identifiers](https://payhumans.ai/docs#identifiers): operation ID, deposit ID, intent hash, route request ID. - [Status and partial fills](https://payhumans.ai/docs#status): available, reserved, fulfilled, withdrawn; polling. - [Expiry and cancellation](https://payhumans.ai/docs#expiry): what happens to a claim that is not paid. - [Recovery and withdrawal](https://payhumans.ai/docs#recovery): resume an interrupted run, withdraw unclaimed funds, return them to Solana. - [Errors](https://payhumans.ai/docs#errors): error codes and what each means for retries. ## Human docs - [Fill orders with the Peer app](https://payhumans.ai/earn): how a person finds, claims, pays and verifies an order; download links; how alerts work. - [Claim page](https://payhumans.ai/earn/recover): look up an order by deposit ID, or recover a claim made in the browser. The CLI's `claimUrl` opens it. ## Optional - [npm package](https://www.npmjs.com/package/payhumans-ai-cli): payhumans-ai-cli - [About PayHumans](https://payhumans.ai/docs#project): project background and the infrastructure it uses. - [Peer](https://peer.xyz): the protocol that provides escrow, payment verification and the mobile app. - [Peer docs](https://docs.peer.xyz)