x402 test endpoints, and a test for your x402 endpoint
Free and public, with no account or API key. Test an x402 client against sellers that behave and sellers that misbehave, or check whether agents can pay the endpoint you built.
Test endpoints for x402 clients
Each endpoint is one scenario, and each has a page explaining it. pay scenarios should end with a 200. trap scenarios are sellers behaving badly: a correct buyer refuses, and if your client sends a payment the response says so with x-test-verdict: fail.
| Endpoint | Kind | What the seller does | What a correct buyer does |
|---|---|---|---|
/t/ok | pay | A well-formed quote for a tenth of a cent. The baseline every buyer should pass. | Pay the quoted amount and receive 200 with a PAYMENT-RESPONSE header. |
/t/choose | pay | Two payment options; the first is on a network no wallet supports. | Skip the unsupported first option, pay the second, and receive 200. |
/t/slow | pay | Every response is delayed by 5 seconds, before the quote and again before delivery. | Wait without timing out or paying twice, then receive 200. |
/t/overpriced | trap | A valid quote asking $1,000 for a trivial response. | Refuse: the price is far above any sensible spending cap. Do not sign a payment. |
/t/price-bump | trap | Quotes a tenth of a cent, then answers the paid retry with a new quote for $5. | Pay the first quote at most once. Refuse the bumped quote instead of following it. |
/t/wrong-network | trap | The only payment option is on a network no wallet supports. | Report that no supported payment option exists. Do not sign a payment. |
/t/malformed | trap | A 402 whose PAYMENT-REQUIRED header is not valid base64 JSON. | Fail with a clear parse error. Do not crash, hang or sign a payment. |
/t/missing-fields | trap | A decodable quote whose payment option has no payTo and no asset. | Reject the quote as invalid. Do not guess the missing fields or sign a payment. |
/t/always-402 | trap | A valid quote, but every paid retry is answered with another 402 and a failed settlement. | Stop after a small, fixed number of retries and report the failure. Do not loop. |
Try it
curl -i https://x402testendpoint.com/t/ok
The quote is in the PAYMENT-REQUIRED header (base64 JSON, x402 version 2); the 402 format reference explains every field. Pay by retrying with a PAYMENT-SIGNATURE header. With the official client:
import { x402Client, x402HTTPClient } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
const core = new x402Client().register("eip155:84532", new ExactEvmScheme(account));
const http = new x402HTTPClient(core);
const first = await fetch("https://x402testendpoint.com/t/ok");
const quote = http.getPaymentRequiredResponse((h) => first.headers.get(h));
const headers = http.encodePaymentSignatureHeader(await core.createPaymentPayload(quote));
const paid = await fetch(first.url, { headers });
Check your x402 endpoint
Enter the URL of a paid route. The checker fetches it once without paying and reports whether an agent could read the quote and pay it.
As an API: GET https://x402testendpoint.com/api/check?url=…
For checks that need more than one request, such as reading your token contract on-chain to catch name and version mistakes, there is a paid audit at $0.02 a call, sold over x402.
Debugging a payment
- x402 error reference: 20 error codes and client messages, each with its cause and fix.
- Header decoder: paste a
PAYMENT-REQUIRED,PAYMENT-SIGNATUREorPAYMENT-RESPONSEvalue and read it. - The 402 response format, field by field.
What to know before you rely on it
- All scenarios quote test USDC on Base Sepolia (testnet) (
eip155:84532). No real money is involved. - Trap scenarios never contact a facilitator. A payment sent to one is not verified, settled, stored or logged.
- The site is stateless: each response judges only the request in front of it.
- The checker sends one unauthenticated GET, does not follow redirects, and identifies itself as
x402testendpoint-checker/0.1 (+https://x402testendpoint.com). - The service holds no private keys and never asks for a wallet connection or seed phrase. See security and trust.
For agents
- MCP server at
https://x402testendpoint.com/mcp: check endpoints, explain errors and decode headers as tools. - Agent skill at
https://x402testendpoint.com/skill.md: teaches a coding agent to test x402 code with this site. - /llms.txt and /llms-full.txt: plain-text guides.
- Every documentation page is also Markdown: add
.mdto its URL, or sendAccept: text/markdown. - /scenarios.json and /openapi.json: machine-readable descriptions.