# AgentPay — Quick Start AgentPay lets AI agents buy things on the internet using single-use virtual cards. Base URL: https://agent-pay.sh --- ## Step 1 — Create an account POST /account/init (no auth, empty body) curl -X POST https://agent-pay.sh/account/init Returns: { "user_id": "...", "api_key": "ap_test_..." } (Production keys use the prefix `ap_live_...`.) Store your api_key. You'll need it for every request. --- ## Step 2 — Check your balance curl -H "Authorization: Bearer YOUR_API_KEY" https://agent-pay.sh/balance --- ## Step 3 — Get funded POST /balance/fund body: {"amount": } curl -X POST https://agent-pay.sh/balance/fund \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"amount": 20}' Returns: { "funding_url": "https://...", "amount": 20, "checkout_amount": 21.40, "fee": 1.40 } Send this URL to your human. When they say 'paid' or 'done', check your balance. --- ## Step 4 — Create a single-use card POST /spend body: {"amount": , "memo": "what you're buying"} curl -X POST https://agent-pay.sh/spend \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"amount": 10, "memo": "buying API credits"}' Returns: real card number, expiry, CVV. Card auto-destructs after use or 30 min. --- That's it. Create account → get funded → create spend card → buy thing.