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.

Metadata

Release files for x402-recon 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for x402-recon 0.5.0
File Size Uploaded
x402_recon-0.5.0.tar.gz 119.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for x402-recon 0.5.0
File Interpreter ABI Platform
x402_recon-0.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 185.0 kB

Release files / x402_recon-0.5.0.tar.gz

Download URL x402_recon-0.5.0.tar.gz
Size 119.8 kB
Tags Source
SHA-256 checksum
How to use checksums
9c46eb9597fd323fb695a69b8b3a23d0cdfa2ed311d5abe3b2d14c12a93eb363
BLAKE2b-256 checksum
How to use checksums
b04b13a1cdfc870fdd43751585a0d7499c80688abc3eee6c8c5f771b7688e3db
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 31, 2026.

Transparency log

Release files / x402_recon-0.5.0-py3-none-any.whl

Download URL x402_recon-0.5.0-py3-none-any.whl
Size 65.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5bbbb76ae4ef0ce481408bd27bb20c0a454e0885e8e53613c302b17b9d2734c9
BLAKE2b-256 checksum
How to use checksums
914d92b8dbf05514f562c6e05e78c47b9fe2837b31c7f31d68263e8ae235c0a7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 31, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.5.0 This release

2 release files

0.4.1

2 release files

0.4.0

2 release 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