Menu

Explorer & Settings

Tempo Explorer Submit Project
Back to all projects
X

x402-polkadot

by crypto-priest · Updated Apr 16, 2026

x402 HTTP payment protocol implementation for the Polkadot/Substrate ecosystem — enabling pay-per-request API monetization with on-chain settlement.

0
Stars
0
Forks
Rust
Language
Nov 23, 2025
Created

In the AI payments ecosystem

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.

README.md View on GitHub →

x402 Polkadot Payment System (Demo)

A demo implementation of the x402 payment protocol for Polkadot.

Payment Flow

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}

Live Demo

Service URL
Client https://x402-client.fly.dev
Server https://server-bold-dream-4447.fly.dev
Facilitator https://facilitator.fly.dev

Quick Start

Prerequisites

  • Rust 1.70+
  • Node.js 18+
  • Wallet mnemonic (12-word phrase)
  • Paseo testnet tokens from Faucet

1. Start Facilitator

cd facilitator
cp .env.example .env
cargo run

2. Start Server

cd server
cp .env.example .env
cargo run

3. Start Client

cd client
cp .env.example .env
npm install && npm run dev

4. Test Payment Flow

  1. Open http://localhost:5173
  2. Click "Load Wallet from .env"
  3. Click "Test /api/paid"
  4. Watch the payment flow complete automatically

Project Structure

x402-polkadot/
├── client/       # Frontend (Vite + JS)
├── server/       # API server (Rust + Axum)
├── facilitator/  # Transaction service (Rust + Subxt)

Resources

All Rust crates →