Skip to main content

x402-recon

CI PyPI Python versions

Reconciliation and customer analytics for agent-initiated x402/USDC stablecoin payments on Base.

Point it at a seller's endpoint or receiving address and it turns a wall of tiny automated payments into a summary: how much came in, and who actually came back versus who just tried it once. It never holds or moves funds, and it is not tax or accounting advice.

Stdlib-only. Zero runtime dependencies. Python 3.11+.

Install

uvx x402-recon --url https://api.example.com/search --last 30d

or install it properly:

pip install x402-recon

Quick start

$ x402-recon --url https://api.exa.ai/search --last 30d

x402-recon - 0x6d6E695b...0B9192
Base mainnet - 2026-07-28 to 2026-08-27 - payTo discovered from api.exa.ai

  Net received          $34.296    from 5349 payments
  Distinct payers            140    38.2 payments each

Who actually came back
----------------------
                    payers   payments         revenue    share
  Returning (3+)        69      5,255         $33.699    98.3%
  Tried twice           23         46          $0.301     0.9%
  One-shot              48         48          $0.296     0.9%

That's real output from a live run. --url discovers the seller's receiving address from their own HTTP 402 response — only a discovered address gets called "x402" in the output; a raw address is reported as "USDC payments," since there's no 402 response backing that stronger claim:

x402-recon 0xRECEIVER_ADDRESS --last 30d

Six commands cover normal use (discover, report, customers, fetch, ingest, categorize); run --advanced to see the research/validation tooling used to measure this tool's own accuracy.

Independently validated. The x402 Bazaar publishes per-service call and unique-payer counts. Over a comparable 30-day window it reports 3,575 calls from 89 payers for the endpoint above; this tool measured 5,349 on-chain payments from 140 payers — within a pre-registered 2x acceptance criterion (API calls and settled on-chain payments count different things over non-identical windows, so close agreement rather than an exact match is the expected result).

What it can't tell you

  • What was bought. x402 settlement carries no resource identifier on-chain, so every transaction's memo is None and the report says so instead of guessing.
  • Grouping accuracy on your data, until you run evaluate against your own labeled sample — payer/service grouping is calibrated on simulated data by default.

Privacy

Addresses on a public blockchain are not secret — anyone can read them. What this tool creates that the chain does not publish is the association: "these addresses are the customers of this seller." That association is yours, and it should not leave your machine by accident.

So terminal output shortens addresses by default (0x6d6E695b…0B9192). Pass --full-addresses to see them whole — after the address on the one-command overview (x402-recon 0xADDR --full-addresses --last 30d), or after report on that command (x402-recon report --full-addresses --from ... --to ...). customers output never includes addresses, so there's nothing to restore there.

CSV exports are the exception: they keep full addresses and transaction hashes, because that is the artifact you reconcile against a bank export or look up on a block explorer, and a truncated address is useless for both. Writing one prints a reminder to review it before sharing.

The tool sends no telemetry. It talks to exactly two kinds of host: the Base RPC endpoint you point it at, and — only when you pass --url — the x402 endpoint whose payment address you are discovering. It writes a cache of fetched ranges and a copy of any skipped rows under ~/.x402-recon/; --no-cache uses a temporary database that is deleted when the run ends.

Development

uv sync
uv run pytest

See CONTRIBUTING.md for the rules (no runtime dependencies, money is always integer micro-USDC, nothing silently dropped) and SECURITY.md for the reporting policy and what this tool does and doesn't send over the network.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

x402_recon-0.5.0.tar.gz (119.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

x402_recon-0.5.0-py3-none-any.whl (65.2 kB view details)

Uploaded Python 3

File details

Details for the file x402_recon-0.5.0.tar.gz.

File metadata

  • Download URL: x402_recon-0.5.0.tar.gz
  • Upload date:
  • Size: 119.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for x402_recon-0.5.0.tar.gz
Algorithm Hash digest
SHA256 9c46eb9597fd323fb695a69b8b3a23d0cdfa2ed311d5abe3b2d14c12a93eb363
MD5 0df786fc856d363a671290232c601904
BLAKE2b-256 b04b13a1cdfc870fdd43751585a0d7499c80688abc3eee6c8c5f771b7688e3db

See more details on using hashes here.

Provenance

The following attestation bundles were made for x402_recon-0.5.0.tar.gz:

Publisher: ci.yml on iamfaham/x402-recon

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file x402_recon-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: x402_recon-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 65.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for x402_recon-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5bbbb76ae4ef0ce481408bd27bb20c0a454e0885e8e53613c302b17b9d2734c9
MD5 0b2b24b1986ba807d70b692a42ae8e51
BLAKE2b-256 914d92b8dbf05514f562c6e05e78c47b9fe2837b31c7f31d68263e8ae235c0a7

See more details on using hashes here.

Provenance

The following attestation bundles were made for x402_recon-0.5.0-py3-none-any.whl:

Publisher: ci.yml on iamfaham/x402-recon

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.5.0 This release

2 files

0.4.1

2 files

0.4.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page