TL;DR
x402 is an open standard that lets websites, APIs, and AI agents charge and pay for individual HTTP requests. I have built a complete alpha implementation of native Kaspa support for it: specs, JSON schemas, test vectors, TypeScript packages, and a live testnet gateway that has settled real testnet-10 payments.
Everything is public at https://kaspa-x402.org.
Before I take this to the two standards bodies involved (CASA, which registers cross-chain network identifiers, and then the x402 Foundation), I want the community’s eyes on it. One decision in particular, the network-identifier convention, is hard to change later. Objections and feedback are welcome until 24 July 2026; after that I will proceed as described below.
What x402 is and why Kaspa fits
When a server wants payment for a request, it replies with HTTP status 402 Payment Required plus a machine-readable price offer. The client pays, retries the request with proof of payment attached, and the server verifies the payment and serves the response. That is the whole protocol. It was started by Coinbase, is now governed by a Linux Foundation project (the x402 Foundation, founded by Coinbase and Cloudflare), and is becoming the default way AI agents pay for APIs and tools.
Kaspa is unusually well-shaped for this. Paying per request only works when payment confirmation is not the slow path, and Kaspa’s block cadence makes one-shot native payments practical at request time: my live gateway verifies accepted payments roughly a second after broadcast. Every blockchain currently in x402 (Solana, TON, Algorand, Stellar, Aptos, Hedera, and the EVM chains) is account-based. Kaspa would be the first UTXO chain, and this implementation is UTXO-native throughout: a payment is identified by its transaction id and outputs, not by account allowances.
What exists today (all public, all testnet-only)
- Standards site: kaspa-x402 has the specs, JSON schemas, test vectors, and immutable release snapshots.
- Reference implementation: GitHub - elldeeone/kaspa-x402: Kaspa x402 is a proposed native Kaspa binding for x402, the HTTP 402 payment protocol. · GitHub with
@kaspa-x402/core,client,server, andcovenantpackages on npm, plus a CLI and runnable examples. - Live gateway: https://demo.kaspa-x402.org is a public testnet-10 server you can pay right now. It runs an automated public health check and holds no spending keys.
- Recorded live evidence: funded end-to-end payment runs on testnet-10, covering one-shot payments, safe handling of replayed and reused transactions, and escrow deposit/voucher settlement. Transaction ids are in the gateway docs and check out on the testnet explorer.
- Browser test client: Browser Test Client — Kaspa x402 for connectivity checks and payment-header rehearsal (keys stay in browser memory).
- Threat model, mainnet-readiness gates, versioning policy, and implementer guide, all published on the site.
To be explicit about limits: this is alpha, testnet-10 only. The wire format is not frozen, and mainnet use is blocked by published gates (independent audit among them). Nothing here claims production readiness.
The two payment schemes I ship, and the two I deliberately do not
x402 defines four payment schemes. This implementation ships two:
exact: a fixed-price one-shot KAS transfer. One caveat for implementers: KIP-9’s storage-mass rules put a floor on standard output size (roughly 0.1 KAS), soexactprices cannot go below that.batch-settlement: the micropayment path, for prices below that floor. A client locks funds in an escrow once, then signs a small voucher for each paid request; the chain is only touched again at claim or refund time. The demo gateway charges 500 sompi per request this way. The escrow covenant is written in SilverScript and validated against Rusty Kaspa consensus.
The other two schemes (upto and auth-capture) are missing for a technical reason, not oversight. Both need a payment authorisation that expires at a deadline, enforced on-chain. Kaspa’s on-chain script (the layer SilverScript compiles down to) only supports lower-bound time locks, because a once-valid transaction must never become invalid. So an expiry can only be approximated by a refund race, and shipping that under upstream’s stricter definition would overstate the guarantee. I built and consensus-validated a capped-authorisation covenant anyway (archived on the archive/capped-authorization-experiment branch) and shelved it until upstream clarifies whether a refund-race expiry qualifies. The full write-up is the native-profile-boundary doc on the site.
What happens next, and where you can object
Step 1: register the kaspa network identifier (CASA). Cross-chain standards, x402 included, need one agreed way to write “which network is this?”. The convention is CAIP-2 identifiers: Ethereum mainnet is eip155:1, Stellar is stellar:pubnet. Kaspa has never registered one. I intend to open a PR at ChainAgnostic/namespaces registering:
kaspa:mainnetkaspa:testnet-10
These are the names RK, explorers, and wallets already use. Some chains register a genesis-block hash instead; I chose names because that is how Kaspa already talks, and hash aliases can be added later if needed. The registration also sets how account addresses are written: the address without its kaspa:/kaspatest: prefix, since the identifier already names the network.
This is an objection check. The identifier convention is the one decision that is hard to change later, so before I lodge the registration: if kaspa:mainnet-style identifiers would break or fight anything you know of, say so in this thread before 24 July 2026. If nothing blocking comes up, I will open the PR.
Step 2: propose the Kaspa bindings to the x402 Foundation. Once the identifier registration is in review, I will open a feature request at x402-foundation/x402 proposing Kaspa support for the exact and batch-settlement schemes, following the same path Stellar, Aptos, and Hedera took.
Step 3: external implementers. After that, I am looking for a few people to test their own clients against the live gateway and report what breaks. There is an implementer guide, a public faucet for testnet funds, and issue templates in the repo.
What I am asking
- Objections to the
kaspa:identifier convention (the time-sensitive one, open until 24 July 2026). - Technical review of the specs, especially from anyone who has built on the WASM SDK.
- Anyone interested in being an early external implementer.
- Corrections: if anything published overstates what Kaspa or this implementation can do, I want to know first.