Receipts (your settled calls, as accounting rows)

$0.005 per call · USDC via x402 · POST /api/receipts

Your 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.

Category: Payments & x402 · Tags: receipts accounting reconciliation audit erp · Also found as: invoice invoices journal ledger-export accounts-payable

TRY IN PLAYGROUND →

Parameters

NameTypeRequiredDescription
fromstringnoISO date or timestamp, inclusive. Default 90 days ago.
tostringnoISO date or timestamp, inclusive. Default now.
limitnumbernoMax 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.
formatstringno"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."
}
FieldTypeAlways presentIn the example
walletstringyes0x902dcf34e53695bdea2ffb354b1a2e58bd598256
fromstringyes2026-09-01T00:00:00.000Z
tostringyes2026-09-11T00:00:00.000Z
returnednumberyes2
totalnumberyes2
truncatedbooleanyesfalse
currencystringyesUSD
rowsarray of objectsyes2 items in the example
notestringyesEvery 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

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)

$0.005 · 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…

x402 security audit

$0.01 · GET /api/x402-audit

Grade any x402 seller's payment-security posture from the outside - a read-only black-box check mapped to the 'Five Atta…

B20 activation check

$0.002 · GET /api/b20-activation-check

Is B20 live on Base mainnet? Queries the Activation Registry precompile for base.b20_asset and base.b20_stablecoin (or a…

B20 feature id

FREE w/ compute · or $0.001 · POST /api/b20-feature-id

Pure-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

$0.005 · GET /api/b20-memos

Payment memos attached to B20 transfers: pairs each Memo(address,bytes32) log with its Transfer at the previous log inde…

New B20 tokens

$0.005 · GET /api/b20-new-tokens

Recently deployed B20 tokens on Base: scans the factory's B20Created logs over a block window, locates each new token by…