๐Ÿ“… Historical page. This content reflects minia2a as of its publication date and is kept for the record. Current model: x402 pay-per-call in USDC on Base only, 5 free trial calls per signed wallet, no credits and no top-up rail. โ†’ See current

Getting Started with Agent Payments โ€” Actually Spend Your Credits

โš ๏ธ Update (2026-09-11): this post predates the 2026-09-06 retirement of the deposit-and-credit rail. Sending USDC to the platform wallet no longer credits a balance โ€” after your 5 free trial calls, each call is paid individually over x402. See the payment docs.
August 9, 2026 ยท Iris ยท minia2a.uk

You registered on minia2a and got 5 free trial calls. Now what?

This guide gets you from "I have credits" to "I just called a paid API and got a result" in under 2 minutes. No blockchain knowledge required. Just HTTP.

The 60-Second Version

1 Register (if you haven't) โ€” V5 is self-custody: generate a wallet locally, sign EIP-191 "minia2a register: <wallet>", then:

curl -s -X POST https://minia2a.uk/api/v1/register-simple \
  -H "Content-Type: application/json" \
  -d '{"name":"my-agent","wallet":"0xYOUR_WALLET","signature":"0xYOUR_SIGNATURE"}'

Your key never leaves your machine. Registration credits 5 free trial calls to your wallet.

2 Spend a credit โ€” call any endpoint with your wallet as a query param:

export WALLET=0xYOUR_WALLET SERVICE=x402-time TS=$(date +%s)
export SIG=0xYOUR_SIGNATURE   # EIP-191 personal_sign of: minia2a trial:$WALLET:$SERVICE:$TS
curl "https://minia2a.uk/x402/time?wallet=$WALLET" \
  -H "X-Wallet-Signature: $SIG" -H "X-Trial-Timestamp: $TS"

That's it. One credit deducted. You get the result.

3 Check your trial state โ€” V5 has no per-wallet balance endpoint (/api/v1/credits โ†’ 404). Your remaining trial calls come back in each 402 response; platform stats live at /api/stats:

curl -s "https://minia2a.uk/api/stats"

The Problem: Why Your Agent Won't Spend Credits

If you're using Claude Code or Codex, you may have noticed: your agent wants to call a paid API, but it stops before paying. This isn't a bug โ€” it's a missing spending policy.

Agent frameworks default to "ask the human before spending money." If you're not watching, the agent stalls. This is the agent purchasing loop problem we wrote about earlier today.

The fix for Claude Code users today:

Method 1: Tell Claude Code to spend (prompt-level)

You have permission to call paid APIs up to $1/call and $5/day.
When you see HTTP 402 with a price under $1, pay it automatically.
My wallet: YOUR_WALLET_ADDRESS
Pass it as the ?wallet= query param on all x402 calls.

Add this to your CLAUDE.md or say it at the start of a session. Claude Code can sign and send USDC transactions when given explicit permission.

Method 2: Use .agent-budget (the standard we're proposing)

Create ~/.agent-budget:

{"daily_limit_usdc": 5, "max_per_call_usdc": 1, "per_task_limit_usdc": 2, "confirmation_threshold_usdc": 0.5, "idempotency_key": true, "verify_settlement": true, "audit_trail": true}

This is a proposed standard โ€” framework support is coming. For now, Method 1 works today.

curl: The Universal Agent Payment Client

You don't need an agent framework to spend credits. curl works everywhere:

Trial mode (signed wallet โ€” 5 free trial calls, no registration)

# sign "minia2a trial:<wallet>:x402-crypto-price:<unix_ts>" (EIP-191) -> $SIG
WALLET=0xYOUR_WALLET; TS=$(date +%s)
curl -s "https://minia2a.uk/x402/crypto-price?symbol=ETH&wallet=$WALLET" \
  -H "X-Wallet-Signature: $SIG" -H "X-Trial-Timestamp: $TS"

Paid mode (no wallet param)

curl -s "https://minia2a.uk/x402/crypto-price?symbol=ETH"   # 402 challenge, pay in USDC

A trial is two halves: the wallet in the query string and the signature headers. The ?wallet= param on its own returns 400 missing X-Wallet-Signature header. Past the 5 free trials, drop the wallet param and pay the 402 challenge โ€” there is no balance and no top-up rail.

Top 10 Endpoints Your Agent Will Actually Use

Based on live trial data โ€” these are what agents actually call right now:

EndpointWhat it doesTrials
x402-gasCurrent gas prices (all chains)2,212
x402-recallWeb recall / search augmentation2,159
x402-captcha-solveSolve CAPTCHAs programmatically1,837
x402-timePrecise UTC time1,446
x402-findFind x402 services by keyword1,418
x402-polymarketPolymarket odds & data1,215
x402-web-scrapeScrape any webpage to text461
x402-uuidGenerate UUIDs362
x402-storeAgent key-value storage343
x402-token-securityToken contract audit (honeypot, tax, ownership)172

Python: Agent Payments in 4 Lines

import requests, os

WALLET = os.getenv("MINIA2A_WALLET")  # your registered wallet
r = requests.get("https://minia2a.uk/x402/crypto-price",
                 params={"symbol": "ETH", "wallet": WALLET})
print(r.json())
# {"ok":true,"result":{"symbol":"ETH","price_usd":...}}

Set MINIA2A_WALLET as an environment variable and every call just works. Same pattern for Node.js, Go, Rust โ€” any HTTP client.

What Happens When Credits Run Out?

When your trial credits run out, you have options:

  1. Buy more credits โ€” send USDC on Base to the platform wallet, then confirm the transfer (see /buy.html).
  2. Pay per call with USDC โ€” the endpoint returns HTTP 402 with a price; your agent signs and settles the transaction directly. No credits needed.
  3. Register a wallet โ€” registration includes a 500-credit grant.
๐Ÿ’ก Pro tip: A HTTP 402 response is the payment signal โ€” its accepts[] array carries the exact price, token, and recipient for direct USDC settlement. If your wallet has trial calls or credits left, the call succeeds; otherwise you get the 402 and pay it directly.

Why Can't I Just Use an API Key?

You can โ€” that's the point. x402 doesn't replace API keys; it removes the need for them. When your agent calls 20 different services, it shouldn't manage 20 different API keys, rate limits, and billing dashboards. One wallet. One payment rail. Any endpoint.

This matters most when:

Already registered?

Paste your wallet on the discover page to get ready-to-run curl commands with your credits pre-filled.


Troubleshooting

"I get a 402 error"

You've hit the 15-call global trial limit (per IP, or per registered wallet). Register โ€” or pass a registered ?wallet= โ€” to keep calling with credits.

"My credits aren't being deducted"

The first 5 calls (global, per IP or registered wallet) are free trials. Credits only deduct after trial exhaustion. There's no per-wallet balance endpoint โ€” platform-wide numbers live at /api/stats.

"My agent stops before paying"

This is the agent purchasing loop problem. Tell your agent it has spending permission (see Method 1 above). We're working on the .agent-budget standard to fix this permanently.

"I lost my wallet address"

Check your agent's environment variables or CLAUDE.md. The wallet is a standard Ethereum address (0x...). V5 is self-custody: you generated the key locally, so the platform never held it โ€” it lives wherever you saved it (env file, keyring, etc.).

Tags: x402, getting-started, agent-payments, tutorial, credits, claude-code, codex