Skip to main content

x402-validator

Audit, monitor, and protect endpoints against the x402 strict-v2 standard.

pip install x402-validator

Quick examples

CLI:

x402-validate https://observer.137-184-67-179.sslip.io

Batch audit:

x402-validate endpoints.txt --output html --parallel 20

MCP server (Claude / Cursor / any MCP client):

echo '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | x402-mcp

Python:

import asyncio
from x402_validator._engine import run_audit

async def main():
    report = await run_audit("https://example.com")
    print(report.summary)

asyncio.run(main())

What it checks

Four core checks plus marketplace mode:

Check Purpose
manifest_discovery GET /.well-known/x402 returns a valid JSON manifest
caip2_compliance A payment header carries a valid CAIP-2 network
json_resilience HTTP 402 body is a JSON object, not a primitive
bazaar_compliance The 402 body has a valid extensions.bazaar block

For multi-product catalogs, use mode="marketplace" (see API.md).

Extended tools (separate repo)

Dashboard, API server, Stripe monetization, and proxy middleware: MSSATANASS/x402-validator-tools

Documentation

License

Apache-2.0.

Release files for x402-validator 0.3.1

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-validator 0.3.1
File Size Uploaded
x402_validator-0.3.1.tar.gz 77.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for x402-validator 0.3.1
File Interpreter ABI Platform
x402_validator-0.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 107.9 kB

Release files / x402_validator-0.3.1.tar.gz

Download URL x402_validator-0.3.1.tar.gz
Size 77.2 kB
Tags Source
SHA-256 checksum
How to use checksums
0cdde661d11047c18d332efaa6e644471b7f567f91312a792c10d778f3040539
BLAKE2b-256 checksum
How to use checksums
89b5fd1e10f8c348e07b50f3e4da21d97bdeb08e7dc55964fa1ea8b799d404e4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.5

Release files / x402_validator-0.3.1-py3-none-any.whl

Download URL x402_validator-0.3.1-py3-none-any.whl
Size 30.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4a4a49709f798fd9947b127c472534b1234d7c14c1073fa7c30e6dede17b162f
BLAKE2b-256 checksum
How to use checksums
1e4d553c23e15bf183a367e6ad85206a803ee83be8eab7254619384176c55be9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.5

Release history Release notifications | RSS feed

This release

0.3.1 This release

2 release files

0.3.0

2 release files

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