Pay any x402 API from the coin you already hold
An x402 endpoint answers 402 Payment Required and asks for USDC. ROZO pays the ones that want USDC on Base. Your agent may hold something else, on another chain. Top up a ROZO balance once with the coin you have, and every later x402 call is paid from that balance in seconds.
Three commands
If your agent can run a shell command, this is the whole integration.
# 1. Fund the balance once. Prints a one-time deposit address; pay it from your own wallet. npx @rozoai/checkout x402 topup 20 --with usdt-solana # 2. Call a paid endpoint. Reads the 402, ROZO signs, the request is sent again with the payment. npx @rozoai/checkout x402 pay https://api.example.com/v1/search --method POST --body '{"q":"..."}' # 3. See what is left. npx @rozoai/checkout x402 balance
What happens on x402 pay
- Your machine sends the request straight to the endpoint. ROZO never sees the request body, your headers or the API keys you use for that service.
- On a 402 the CLI reads the payment requirements, keeps only USDC on Base, and refuses anything above
--max-usd(default 1.00). - It asks ROZO to sign one payment with a fresh
idempotencyKey. A retry reuses the same key, so a timeout can never charge you twice. - It sends the original request again with the
PAYMENT-SIGNATUREheader and prints the response.
Raw HTTP: two calls
No shell? Use the same API directly. Send your agent key as Authorization: Bearer ak_....
# Top up: returns a one-time deposit address for the coin you chose. curl -s -X POST https://apiserver.mpprouter.dev/v1/x402/topup \ -H 'authorization: Bearer ak_...' -H 'content-type: application/json' \ -d '{"amount":"20","token":"USDT","chain":"900"}' # Sign: pass the one requirement you picked from the 402 "accepts" list. # Returns the value for the PAYMENT-SIGNATURE header. Replay your request with it. curl -s -X POST https://apiserver.mpprouter.dev/v1/x402/sign \ -H 'authorization: Bearer ak_...' -H 'content-type: application/json' \ -d '{"accepts":[{"scheme":"exact","network":"eip155:8453","amount":"10000","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0x...","maxTimeoutSeconds":60}],"budget":"0.05","idempotencyKey":"<uuid>"}'
POST /v1/x402/keys creates the agent key (shown once). GET /v1/x402/balance returns the balance. Reuse the same idempotencyKey on every retry of one payment.
What you can fund with, and what gets paid
Two legs, listed apart on purpose: what you send ROZO, and what the seller receives.
Top up leg (you to ROZO)
| Coin | Chains |
|---|---|
| USDT | Solana, BNB Chain, Ethereum, Polygon |
| USDC | Solana, BNB Chain, Ethereum, Polygon, Base, Stellar |
Payment leg (ROZO to the x402 seller)
| Network | Asset | x402 scheme |
|---|---|---|
Base eip155:8453 | USDC | exact |
| Solana | Coming later. An endpoint that only accepts USDC on Solana is refused before anything is charged. | |
exact payments are token transfers; from a balance funded with USDT, ROZO pays the seller in USDC. Holding a native coin or sats? Use them to top up OpenRouter with ROZO Checkout.Limits and your key
- Per payment: at most $5 by default. Per day: at most $100 by default. You can also restrict a key to a list of
payToaddresses. - Minimum top up: $5. The top up carries a 1% fee; each x402 payment from the balance costs only what the seller asks.
- Agent key: the first top up creates a key that starts with
ak_. It is shown once and the CLI stores it in~/.rozo-checkout/x402-keywith owner only permissions. ROZO keeps only a hash of it. - The key owns the balance. Do not paste it into prompts, logs or tickets. If you lose it, create a new one and contact us to move the balance.
FAQ
Why do I have to top up first?
An x402 payment requirement is valid for one to five minutes, while moving funds across chains takes longer. Paying from a balance that is already in place is the only way to answer inside that window. You top up rarely and in larger amounts; you pay often and in small ones.
Where is my money?
In your ROZO x402 balance. The funds sit in ROZO wallets, the one on Base signs the payments for your key, and the total of all balances is reconciled against those wallets every hour. ROZO never holds your own wallet keys.
How do I get my balance back?
Withdrawals are not self serve yet. Email hi@rozo.ai with your masked key (for example ak_...a1b2) and the amount, and we send it back on the chain you choose.
Does ROZO see my request?
No. The paid request goes from your machine to the endpoint. ROZO only sees the payment requirement it is asked to sign: who gets paid, how much, on which network.
Which networks can the seller be paid on?
USDC on Base (eip155:8453), x402 scheme exact. The Solana payment leg is coming later. If an endpoint only accepts Solana, the CLI stops with X402_UNSUPPORTED and nothing is charged.
Read the agent guide
The same three commands, every error code and the safety rules are in SKILL.md and in /llms.txt.
Open rozo-checkout-skill Read /llms.txt