HTTP/1.1 402 PAYMENT REQUIRED agent402.base.eth · BASE · SOLANA · POLYGON · ARBITRUM · STELLAR · ROBINHOOD · USDC · USDG
Agent402 / tools / my-usage

My usage (wallet-keyed purchase history)

$0.005 per call · USDC via x402 · POST /api/my-usage

Your own purchase history, keyed to the wallet that pays for the call — no wallet parameter, no signup: the x402 payment IS the identity, so nobody can read another wallet's profile. Returns totals, per-tool counts, per-chain breakdown, and recent receipts with settle tx hashes (independently verifiable on-chain). Requires an EIP-3009 payment (USDC on Base, Polygon, or Arbitrum); Solana/Stellar payments carry no signed payer the server can verify.

Input

FieldTypeDescription
daysnumberAggregation window in days, 1-365 (default 30). The recent list is always the latest rows regardless.
limitnumberMax recent receipts to return, 1-200 (default 50)

Example output

{
  "wallet": "0xfeda7403aabe9a492ed70e810b396d8548a4a022",
  "days": 30,
  "persistent": true,
  "totals": {
    "calls": 42,
    "paidUsd": 1.234,
    "firstAt": "2026-07-01T00:00:00.000Z",
    "lastAt": "2026-07-09T00:00:00.000Z"
  },
  "byNetwork": {
    "base": {
      "calls": 40,
      "usd": 1.2
    },
    "polygon": {
      "calls": 2,
      "usd": 0.034
    }
  },
  "bySlug": [
    {
      "slug": "hash",
      "calls": 12,
      "usd": 0.012,
      "lastAt": "2026-07-09T00:00:00.000Z"
    }
  ],
  "recent": [
    {
      "at": "2026-07-09T00:00:00.000Z",
      "slug": "hash",
      "priceUsd": 0.001,
      "network": "base",
      "tx": "0x…"
    }
  ],
  "note": "Every USDC row keeps its settle tx — verifiable on-chain."
}

Try it — see the 402 challenge (free)

curl -i -X POST https://agent402.tools/api/my-usage \
  -H "Content-Type: application/json" \
  -d '{"days":30}'

The response is HTTP 402 Payment Required with exact payment requirements. Any x402 v2 client pays automatically and retries:

Paid call (JavaScript agent)

import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client();
registerExactEvmScheme(client, { signer: privateKeyToAccount(KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);

const res = await payFetch("https://agent402.tools/api/my-usage", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "days": 30
  }),
});
Wallet-only. This tool reaches the network/browser/storage, so it is paid in USDC via x402 (no proof-of-work tier).

Related tools

x402 quote

$0.003 · GET /api/x402-quote

Probe any URL and decode its HTTP 402 payment requirements (price, asset, network, pay-to) into clean JSON — what an age…

USDC balance

$0.003 · GET /api/usdc-balance

Read the USDC balance of any address on Base, Polygon, Arbitrum, Optimism, or Ethereum. Read-only on-chain call. ?addres…

Transaction status

$0.003 · GET /api/tx-status

Check the confirmation status of a transaction by hash on Base/Polygon/Arbitrum/Optimism/Ethereum/Robinhood Chain: succe…