Tools / x402 response validator

x402 response validator

Free · runs in your browser · nothing is uploaded

Paste the JSON body your server returns with an HTTP 402 and this linter checks it against the x402 v1 exact scheme — the required fields, whether the amount is a correct atomic-unit string, and the small mistakes that quietly make agents skip your endpoint.

What it checks

The 402 body should carry an x402Version and a non-empty accepts array; each entry needs scheme, network, maxAmountRequired (atomic units as a string, not a dollar decimal), asset, payTo, and resource. The validator also flags the classics: a decimal amount, a placeholder wallet, amount used instead of maxAmountRequired, and a resource that isn't a URL.

Checks follow the x402 v1 "exact" scheme in common use; consult the official spec for the authoritative field list. Editorial tool — verify before production use.

Next steps

Need to build a 402 body first? Use the 402 response generator. Wiring the full flow: how to accept x402 payments. Pricing the endpoint: pricing calculator and how to price an API for AI agents.