Don't trust · verify

Can this seller actually take your money?

x402 tells an agent what a resource costs. It says nothing about whether the seller can currently settle what it charges, and the gap is paid for by the buyer: a signed transfer, a consumed blockhash, a 502, and no service. Preflight closes it. Paste any origin below and this page fetches its /.well-known/x402-preflight attestation and verifies the ed25519 signature, the expiry and the subject entirely in your browser. Nothing is taken on our word.

Try:

Use it from your own agent

The client is a package. It fetches, verifies, and refuses to let you pay a seller that cannot settle, re-routing to a rail that works when one is available.

npm i @three-ws/x402-preflight

import { guardedFetch } from '@three-ws/x402-preflight';

// A drop-in fetch that will not spend your money on a seller who cannot deliver.
const fetch402 = guardedFetch({ prefer: ['solana:mainnet'] });
await fetch402('https://three.ws/api/x402/echo');

Or from a terminal, where the exit code is the answer:

npx @three-ws/x402-preflight https://three.ws --network solana:mainnet && echo "safe to pay"

The wire format is public and unencumbered: any x402 seller can publish one and any client can verify it. Read the documentation for the format, the verification rules, and how to serve an attestation from your own endpoint.