k402
Testnet research software — unaudited, not for real value. Get set up on testnet-10 →
§ 0
← the directory
Nothing is charged or stored: the probe is one unpaid GET sent from this site's server (your browser never contacts your host), nothing in the response is kept, and the result is shown only to you.

Validate your service

Preflight your endpoint before you list it. We send one unpaid request and check it speaks x402 v2 — a 402 whose PAYMENT-REQUIRED header decodes to a valid offer with a recognized Kaspa scheme and a well-formed payTo — so agents don’t hit a dead listing.

§ 1
The probe. One unpaid request, from this site's server.
What a pass looks like
Endpoint URL
public https URL
Reachable
responded in 240 ms (HTTP 402)
Returns 402
HTTP 402 Payment Required to an unpaid request
Speaks x402 v2
PAYMENT-REQUIRED decodes to a valid offer
Payment terms
exact · kaspa:mainnet · 1.1 KAS → kaspa:qzws…pde4
§ 2
Common failures and their fixes.
Common failures and their fixes
Returns 200 to an unpaid request
There is no pay-gate on that URL. Wrap the handler with @kaspa-x402/server (KAS) or K402(kusd=…) (kUSD) so a request without PAYMENT-SIGNATURE gets a 402.
402 without a PAYMENT-REQUIRED header
The offer must ride in the response header named PAYMENT-REQUIRED (any case), not in the body. Behind a proxy or CORS layer, make sure the header is passed through and exposed.
Header does not decode
PAYMENT-REQUIRED is base64 of a JSON PaymentRequired with x402Version 2 and an accepts[] array. A raw JSON string or a truncated header fails here.
Unknown scheme or network
Each accepts[] entry needs scheme exact or batch-settlement and network kaspa:mainnet or kaspa:testnet-10 (kusd-utxo for kUSD listings on the market). Typos such as kaspa:testnet10 fail.
payTo malformed
payTo is a bech32 Kaspa address on the same network as the entry: kaspa: for mainnet, kaspatest: for testnet-10. A mismatch between the two is the most common cause.
Endpoint not reachable
The URL must be public (no localhost or private ranges), answer TLS correctly and reply within 9 seconds. Try the same curl -si from another machine.

Built on k402, the Kaspa x402 v2 standardkaspa-x402.org (opens kaspa-x402.org). Your pay-gate should return a 402 with a PAYMENT-REQUIRED header to any request that has no PAYMENT-SIGNATURE — the @kaspa-x402/server SDK does this for you.