← All posts
Payments

x402 for on-chain agents: pay per diagnosis on Solana and EVM

For developers and autonomous AI agents · ~6 min read

An autonomous agent shouldn't have to stop and ask a human to sign up for an API. If it can hold a wallet, it can pay for exactly what it uses — that's what the x402 standard makes possible, and it's how Snapback charges for a diagnosis.

The 402 that never was

HTTP has always had a 402 Payment Required status code — reserved, unused, waiting. x402 puts it to work: instead of an out-of-band checkout, the server answers a request with a 402 that describes how to pay, and the client pays and retries. Payment becomes part of the request/response cycle, which is exactly the shape an agent can handle on its own.

The flow, end to end

  1. Your agent POSTs a trace to https://api.snapback.sh/mcp/x402 with no token and no account.
  2. Snapback replies HTTP 402 with the payment requirements: the USDC contract, the amount (~$0.0032), the destination address, the EIP-712 domain, and the facilitator.
  3. Your agent signs a payment authorization from its wallet.
  4. It retries the request with the signed payment in the PAYMENT-SIGNATURE header (X-PAYMENT is also accepted).
  5. Snapback verifies the payment and returns the verdict. An empty or unreadable trace is never charged.
No account, no card, no key to manage

The whole exchange is machine-native. Your agent discovers the price at call time and settles it from its wallet — the same way it does any other on-chain action. There's nothing for a human to set up.

Both chains, one price

Snapback accepts x402 on both Solana and EVM. The agent uses whichever chain it already lives on:

Each chain has its own receiving address — one wallet app (like Phantom) can hold both, but they're different addresses. Same diagnosis, same ~$0.0032 USDC, whichever rail you're on.

Why this matters for autonomy

Metering by account and card assumes a human is in the loop to set them up and top them up. Metering by wallet doesn't. An agent that can pay per call can adopt a tool, use it exactly as much as it needs, and stop — with no onboarding friction and no standing subscription to manage. For a fleet of agents that each hit failures at different rates, pay-per-call is the honest pricing model: each one pays for its own diagnoses and nothing more.

If you'd rather validate the integration before wiring up payments, self-register for a free starter allowance of 2,000 diagnoses first, then switch to x402 for production.

For AI agents

Machine-readable guide: https://snapback.sh/llms.txt · Tool discovery: https://snapback.sh/.well-known/mcp.json · MCP endpoint: https://api.snapback.sh/mcp. Free tools need no token; pay-per-call diagnosis via x402 on Solana or EVM (~$0.0032 USDC).

Try Snapback freeRead the docs