Receipts (your settled calls, as accounting rows)
POST /api/receiptsYour own settled calls in the shape a finance system posts: one row per payment with what was bought, the amount settled, the quoted ceiling where one applied, and the evidence - settlement transaction, sha256 of the bytes delivered, and the on-chain attestation id where one exists. Send POST /api/receipts with no required fields (4 optional) and pay $0.005 per call over x402 with USDC on an EVM chain (the paying wallet is the identity). It returns a JSON object with wallet, from, to, returned, total and 4 more.
Keyed to the wallet that pays for the call, so nobody can read another wallet's payables; no account, no export request, no support ticket. Requires an EIP-3009 payment (USDC on Base, Polygon, or Arbitrum). Use format "csv" for a subledger import.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
from | string | no | ISO date or timestamp, inclusive. Default 90 days ago. |
to | string | no | ISO date or timestamp, inclusive. Default now. |
limit | number | no | Max rows per page, 1-5000 (default 500). `total` is the uncapped count for the window and `truncated` says when the page is short of it. |
format | string | no | "json" (default) or "csv" - the flat form a subledger imports. |
Example request
curl -i -X POST https://agent402.tools/api/receipts \
-H "Content-Type: application/json" \
-d '{"from":"2026-09-01","limit":100}'
Without payment this returns HTTP 402 Payment Required with the exact price for receipts; any x402 v2 or MPP client pays it and retries.
Example response
{
"wallet": "0x902dcf34e53695bdea2ffb354b1a2e58bd598256",
"from": "2026-09-01T00:00:00.000Z",
"to": "2026-09-11T00:00:00.000Z",
"returned": 2,
"total": 2,
"truncated": false,
"currency": "USD",
"rows": [
{
"settledAt": "2026-09-09T10:03:05.816Z",
"item": "v1-chat-metered",
"amountUsd": 0.642466,
"quotedUsd": 0.74,
"rail": "usdc",
"network": "solana",
"wire": "x402",
"settlementTx": "5Nk…",
"responseSha256": "9f86d0…",
"attestationUid": null
},
{
"settledAt": "2026-09-08T13:15:07.000Z",
"item": "hash",
"amountUsd": 0.001,
"quotedUsd": null,
"rail": "usdc",
"network": "base",
"wire": "x402",
"settlementTx": "0x6563…",
"responseSha256": "2c26b4…",
"attestationUid": "0x76e736…"
}
],
"note": "Every row's settlementTx is verifiable on the named chain without asking us."
}
| Field | Type | Always present | In the example |
|---|---|---|---|
wallet | string | yes | 0x902dcf34e53695bdea2ffb354b1a2e58bd598256 |
from | string | yes | 2026-09-01T00:00:00.000Z |
to | string | yes | 2026-09-11T00:00:00.000Z |
returned | number | yes | 2 |
total | number | yes | 2 |
truncated | boolean | yes | false |
currency | string | yes | USD |
rows | array of objects | yes | 2 items in the example |
note | string | yes | Every row's settlementTx is verifiable on the named chain without asking us. |
From an MCP client
catalog.call {
"slug": "receipts",
"params": {
"from": "2026-09-01",
"limit": 100
}
}
The hosted connector at https://agent402.tools/mcp needs a payment for receipts; the stdio package pays it from a wallet or from AGENT402_CREDITS_KEY (wallet only for this tool). Local install: npx -y agent402-mcp.
Errors and behavior
- Every field is optional. An input the tool rejects returns an HTTP 4xx whose body carries
error,tool,expected,requiredandexample. - A paid call that ends in any status of 400 or above is not charged over x402 or MPP: settlement is cancelled when the tool fails.
- Wallet-only: this tool reaches the network or stored state, so it has no proof-of-work tier.
- Identity-bound: results are keyed to the wallet that signed the payment, so only EVM x402 payments are accepted; credits keys and Tempo are refused.
- A
GETorHEADto /api/receipts returns the same 402 quote, so the price can be read without a body. - An
Idempotency-Keyheader makes a retried paid call replay the first 200 instead of charging again (an answer larger than 1 MB is not replayed).
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();
client.setSpendControls?.(false); // keep your own spending ceiling in code
registerExactEvmScheme(client, { signer: privateKeyToAccount(KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);
const res = await payFetch("https://agent402.tools/api/receipts", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"from": "2026-09-01",
"limit": 100
}),
});
Related tools
My usage (wallet-keyed purchase history)
POST /api/my-usageYour own purchase history, keyed to the wallet that pays for the call - no wallet parameter, no signup: the x402 payment…
x402 security audit
GET /api/x402-auditGrade any x402 seller's payment-security posture from the outside - a read-only black-box check mapped to the 'Five Atta…
B20 activation check
GET /api/b20-activation-checkIs B20 live on Base mainnet? Queries the Activation Registry precompile for base.b20_asset and base.b20_stablecoin (or a…
B20 feature id
POST /api/b20-feature-idPure-CPU helper: turn a B20 feature string (e.g. base.b20_asset) into its bytes32 feature id and ready-to-send isActivat…
B20 payment memos
GET /api/b20-memosPayment memos attached to B20 transfers: pairs each Memo(address,bytes32) log with its Transfer at the previous log inde…
New B20 tokens
GET /api/b20-new-tokensRecently deployed B20 tokens on Base: scans the factory's B20Created logs over a block window, locates each new token by…