npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

x402-endpoint-check

v0.1.0

Published

Passive security and setup checks for x402 payment endpoints

Readme

x402-check

Passive security and setup checks for x402 payment endpoints. Point it at a paid URL and it tells you, in plain language, what to fix before agents start paying it.

It never signs or sends a real payment, and it makes at most 3 HTTP requests per run.

npx x402-endpoint-check https://api.example.com/premium-data

Installed globally (npm i -g x402-endpoint-check), the command is x402-check.

Prefer a browser? Use the hosted version at https://ledgers.ae/tools/x402-checker/

What it checks

| ID | Check | Why it matters | |---|---|---| | X01 | Unpaid requests get HTTP 402 | Otherwise your content is free | | X02 | x402 v2 (PAYMENT-REQUIRED) vs v1 | v2 is the current spec | | X03 | Payment requirements are complete and valid | A wrong payTo or network means payments go nowhere | | X04 | A junk payment header is rejected | Some servers only check that the header exists | | X05 | Paid responses can't be cached by a CDN | A cached paid response is served to everyone | | X06 | HTTPS and no cross-host redirect | Payment headers must not leak | | X07 | CORS exposes payment headers (recommendation) | Browser agents can't read hidden headers | | X08 | Discovery (Bazaar) metadata | Helps agents find your endpoint |

Details and fixes for each check: docs/checks.md. The checks map to the attack classes in Five Attacks on x402 Agentic Payment Protocol (arXiv 2605.11781), explained in the agentic payment security guide.

Usage

npx x402-endpoint-check <url> [--method GET|POST] [--json] [--timeout 10000]

Exit codes: 0 no high or critical findings, 1 high or critical findings, 2 usage or network error. That makes it easy to run in CI:

- run: npx x402-endpoint-check https://staging.example.com/paid --json > x402-report.json

As a library:

import { checkEndpoint } from "x402-endpoint-check";
const report = await checkEndpoint("https://api.example.com/premium-data", { fetch });

What it does not check

Passive checks can't prove that replay protection, settlement ordering or settlement preemption are handled correctly. Testing those means sending real (testnet) payments, retrying them and racing them, which is only safe on endpoints you own. We do that inside the Agentic Payment Security Audit.

Privacy

The CLI talks only to the URL you give it. The hosted version does not store the URLs you check or the reports. It logs only the hostname and the most severe result, for abuse prevention and usage counts.

Terminal output escapes control characters, so a hostile endpoint cannot inject escape sequences into your terminal.

Contributing

See CONTRIBUTING.md. Changes go through an OpenSpec proposal in openspec/changes/ and are developed test-first.

License

Apache-2.0