x402receipts
Accounting infrastructure for autonomous spending. Every x402 purchase an agent makes becomes a receipt, reconciled against the on-chain transaction, with missing or unmatched payments flagged, monthly statements for finance, and evidence anyone can verify.
Use it
In code — one wrapper around the fetch your agent already pays with (npm i x402receipts-sdk):
import { wrapFetchWithPayment } from "@x402/fetch";
import { withRegister } from "x402receipts-sdk";
const register = withRegister(fetch, { endpoint: "https://app.x402receipts.com", payWith: () => pay });
const pay = wrapFetchWithPayment(register, wallet);
As an MCP server (npx -y x402receipts-mcp): record_receipts, verify_receipt, service_info. See packages/mcp.
Over HTTP: POST https://app.x402receipts.com/api/v1/receipts — answers 402 with the x402 challenge; any x402 client pays it.
With an AI coding tool: paste the integration prompt into Claude Code or Cursor.
In this repo
How it works
- Capture — the SDK records each paid call: resource, amount, counterparty, transaction reference, request/response fingerprints, delivery status, and the seller's signed receipt when it issues one (x402
offer-receipt).
- Reconcile — the connected wallets are read on Base and Solana; every outgoing USDC payment is matched to a receipt. What doesn't match is an exception, not an average.
- Prove — each night, each account's receipts form a group; the group's Merkle root is written to the Hedera Consensus Service with a link to the group page. Every receipt has a public verification page that redoes the maths in the browser.
- Report — the owner signs in with the wallet: spend by supplier, the register, CSV and signed JSON export.
Guide: https://x402receipts.com/guide.html · Status: https://app.x402receipts.com/status · Contact: hello@x402receipts.com
MIT licensed.