POST /api/my-usageYour 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.
| Field | Type | Description |
|---|---|---|
days | number | Aggregation window in days, 1-365 (default 30). The recent list is always the latest rows regardless. |
limit | number | Max recent receipts to return, 1-200 (default 50) |
{
"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."
}
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:
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
}),
});
GET /api/x402-quoteProbe any URL and decode its HTTP 402 payment requirements (price, asset, network, pay-to) into clean JSON — what an age…
GET /api/usdc-balanceRead the USDC balance of any address on Base, Polygon, Arbitrum, Optimism, or Ethereum. Read-only on-chain call. ?addres…
GET /api/tx-statusCheck the confirmation status of a transaction by hash on Base/Polygon/Arbitrum/Optimism/Ethereum/Robinhood Chain: succe…