x402 HTTP payment protocol implementation for the Polkadot/Substrate ecosystem — enabling pay-per-request API monetization with on-chain settlement.
x402-polkadot is an early-stage Rust project in the AI payments / x402 ecosystem, focused on blockchain, payments, polkadot, rust. It currently has 0 GitHub stars and 0 forks, and sits alongside related tools like tdm-integration-kit, x402-solana-rust, tempo-x402.
A demo implementation of the x402 payment protocol for Polkadot.
sequenceDiagram
participant Client
participant Server
participant Facilitator
participant Polkadot
Client->>Server: GET /api/paid
Server->>Client: 402 Payment Required
Note over Client: Auto-signs transaction
Client->>Server: GET /api/paid + X-PAYMENT header
Server->>Facilitator: POST /verify
Facilitator->>Server: {valid: true}
Server->>Facilitator: POST /settle
Facilitator->>Polkadot: Submit transaction
Polkadot->>Facilitator: Confirmed
Facilitator->>Server: {settled: true, tx_hash}
Server->>Client: 200 OK {protected content}
| Service | URL |
|---|---|
| Client | https://x402-client.fly.dev |
| Server | https://server-bold-dream-4447.fly.dev |
| Facilitator | https://facilitator.fly.dev |
cd facilitator
cp .env.example .env
cargo run
cd server
cp .env.example .env
cargo run
cd client
cp .env.example .env
npm install && npm run dev
http://localhost:5173x402-polkadot/
├── client/ # Frontend (Vite + JS)
├── server/ # API server (Rust + Axum)
├── facilitator/ # Transaction service (Rust + Subxt)
Developer integration tools for adding TDM payments to AI agents, apps, and workflows. CLI, MCP server, and copy-paste examples
Production-ready Rust server template for building HTTP APIs with x402 payment integration on Solana. Accept USDC payments for API access. Includes Axum, Actix and Rocket templates.
Autonomous AI colony on the blockchain. Self-replicating agents that clone, evolve their own source code, benchmark their IQ, share neural weights, and pay each other with crypto. All in Rust.
Agent behavior that compiles
An open SDK for agentic payments. Let AI agents make payments, hold funds, and move money across chains with policy enforcement and human approval built in.
x402 payments in Rust: verify, settle, and monitor payments over HTTP 402 flows
Context-aware agentic LLM gateway & router that optimize your agentic workflows with every runs, works with any harnesses, any models, any workflows.
Production-ready x402 facilitator server.
Rust SDK for the x402 payment protocol.