Give your agent a wallet, safely, in five steps
Your agent pays with its own wallet. Here is the safe way to set one up.
⚠️ Never share a private key with us, with an assistant or in a chat. We never ask for one.
Create a dedicated wallet
Use a new EVM wallet (any wallet app or library) only for your agent. Never reuse your main wallet: this one holds a few dollars, not your savings.
Fund it with a few dollars of USDC on Base
Send USDC on the Base network to its address. No ETH is needed: calls cost fractions of a cent, so $5 covers hundreds of them.
Give the key to your x402 client, and only there
Put the private key in an environment variable or your secret manager (for instance WALLET_PRIVATE_KEY), read by the x402 client. Never paste it in a prompt, a chat, a repository or a log.
Set a spending cap
Configure a maximum per payment in your client, and keep the balance low: the balance itself is your overall cap.
Try it for $0.002
Call the ping service: it is the cheapest end-to-end test, challenge, signature, settlement and reply included. Want to practise without real money? Use Base Sepolia test USDC.