x402 on Cosmos

The x402 payment pattern,
built for Neutaro

ClawPurse Gateway implements HTTP 402 Payment Required on the Neutaro blockchain — the same micropayment pattern Coinbase pioneered for EVM, now available for Cosmos SDK chains, DePIN operators, and agentic AI.

What is x402?

The HTTP specification reserved status code 402 Payment Required decades ago, but it was never standardized — until now. The x402 protocol, initially developed by Coinbase, defines a machine-readable payment flow built directly into HTTP requests. A client hits a gated endpoint, receives a 402 response with an invoice, pays on-chain, and retries with proof. No accounts, no API keys, no subscriptions.

ClawPurse implements this exact pattern on the Neutaro blockchain (Cosmos SDK), settling payments in NTMPI — the native token of the Timpi decentralized search ecosystem. This makes ClawPurse the x402 implementation for the Cosmos ecosystem.

How ClawPurse x402 works

The payment flow is identical to the x402 standard — request, 402 invoice, on-chain payment, retry with proof:

AI Agent / Script / Browser | |── GET /api/data ──────────────────▶ ClawPurse 402 Gateway | | | ◀── 402 Payment Required ─────────────┘ | { invoiceId, amount, address, memo } | |── clawpurse send <address> <amount> --memo <memo> | (on-chain NTMPI payment via agentic wallet) | |── GET /api/data ──────────────────▶ ClawPurse 402 Gateway | Header: X-Payment-Proof: <invoiceId> | | | Gateway verifies tx on Neutaro chain | | | | ◀── 200 OK (proxied from upstream) ───┘

ClawPurse vs. Coinbase x402

Both implement HTTP 402 Payment Required. The difference is the settlement layer and operational model.

Coinbase x402ClawPurse Gateway
ChainBase, Polygon, Solana (EVM)Neutaro (Cosmos SDK)
TokenUSDC, ERC-20sNTMPI
VerificationCentralized facilitatorDirect on-chain REST query
CustodyFacilitator-mediatedSelf-hosted, zero custody
WalletCoinbase Agentic WalletsClawPurse CLI + API (local keystore)
GuardrailsSession caps, tx limitsSpending limits, allowlists, confirmation thresholds
DeployCoinbase SDK / Vercel middlewareDocker / bare metal, self-hosted
LicenseApache 2.0MIT
Target ecosystemEVM DeFi, stablecoin paymentsDePIN, Timpi search, Cosmos validators

Why x402 on Cosmos?

No facilitator needed

Coinbase x402 routes payments through a facilitator service. ClawPurse verifies transactions directly against the Neutaro REST API — no intermediary, no trust assumptions.

Sub-cent transactions

Neutaro transaction fees are fractions of a cent. Gate APIs at $0.001 per request without the fee eating the payment.

DePIN-native

NTMPI is the token DePIN node operators already earn and hold. ClawPurse lets them monetize services in the token they're already staking.

Agentic wallet with guardrails

The ClawPurse wallet was built for autonomous AI agents from day one — encrypted keystores, destination allowlists, and spending limits that work without human oversight.

Fully self-hosted

One-command Docker deploy or bare-metal install. Your gateway, your server, your keys. No SaaS dependency.

Cosmos IBC future

Built on Cosmos SDK with IBC interoperability. As the protocol matures, cross-chain 402 flows become possible across the Cosmos ecosystem.

Built for agentic AI

ClawPurse was designed inside the OpenClaw AI agent framework. Every component — the wallet, the gateway, the faucet — assumes the operator might be a machine, not a human.

  • Autonomous 402 flow — Agents detect 402 responses, parse invoices, pay on-chain, and retry with proof programmatically
  • SKILL.md integration — Drop-in agent skill wraps the CLI for OpenClaw and other frameworks
  • PoW faucet — Timpi Drip uses proof-of-work instead of CAPTCHA so agents can self-fund
  • Guardrail wizard — Configure spending limits, allowlists, and confirmation thresholds before giving an agent wallet access
  • Prepaid balances — Agents deposit once, then make many API calls without repeated on-chain transactions

Quick start

1. Install the wallet

git clone https://github.com/mhue-ai/ClawPurse.git cd ClawPurse && npm install && npm run build && npm link clawpurse init --password <pass>

2. Deploy the gateway

git clone https://github.com/mhue-ai/clawpurse-gateway.git cd clawpurse-gateway && npm install cp .env.example .env # Set GATEWAY_PAYMENT_ADDRESS and JWT_SECRET docker compose up

3. Test the x402 flow

curl http://localhost:4020/api/test # → 402 Payment Required { invoiceId, amount, address, memo } clawpurse send <address> <amount> --memo <memo> --password <pass> --yes curl -H "X-Payment-Proof: <invoiceId>" http://localhost:4020/api/test # → 200 OK

Frequently asked questions

What is x402?
x402 is an open payment protocol that uses the HTTP 402 Payment Required status code to gate web resources behind cryptocurrency micropayments. A client requests a resource, receives a 402 response with payment instructions, pays on-chain, and retries with proof. ClawPurse implements this pattern on the Neutaro (Cosmos SDK) blockchain using NTMPI tokens.
How does ClawPurse compare to Coinbase x402?
Coinbase x402 uses EVM chains (Base, Polygon) and stablecoins (USDC) with a centralized facilitator for payment verification. ClawPurse implements the same HTTP 402 pattern but on the Neutaro Cosmos SDK chain with NTMPI tokens, using direct on-chain verification with no facilitator required. ClawPurse is fully self-hosted, open source, and designed for DePIN operators and AI agents.
Can AI agents use ClawPurse for x402 payments?
Yes. ClawPurse is purpose-built for agentic AI. Agents programmatically detect 402 responses, parse invoices, pay on-chain via the ClawPurse wallet API, and retry with payment proof — all without human intervention. Built-in guardrails include spending limits, destination allowlists, and confirmation thresholds.
What chains does ClawPurse support?
ClawPurse runs on the Neutaro blockchain, a Cosmos SDK chain. Payments settle in NTMPI, the native token of the Timpi decentralized search ecosystem. This makes ClawPurse the x402 implementation for the Cosmos ecosystem.
Does the gateway hold my funds?
No. ClawPurse is fully non-custodial. The wallet stores encrypted keystores locally — mnemonics never leave your machine. The gateway verifies payments on-chain but never touches funds. You self-host everything.
How do I get NTMPI to test with?
Visit Timpi Drip to claim free NTMPI via proof-of-work challenge (works for both humans and AI agents). For larger amounts, use the Get NTMPI portal for one-click access to Uniswap, MEXC, and OraiDEX.

Part of the ClawPurse ecosystem

ClawPurse Wallet

Local NTMPI wallet with encrypted keystores, guardrails, staking, and a programmatic API for agents.

clawpurse.ai

402 Gateway

HTTP reverse proxy implementing x402 with pay-per-request and prepaid balance flows.

gateway.clawpurse.ai

Timpi Drip

Agent-friendly NTMPI faucet with proof-of-work instead of CAPTCHA.

drip.clawpurse.ai

Timpi Ledger

Neutaro wallet explorer, NFT viewer, and IRS tax estimator with FIFO/LIFO/HIFO cost basis.

ledger.clawpurse.ai