tempo-x402-demo

February 5, 2026 ยท View on GitHub

Interactive demo of the tempo-x402 payment protocol.

Demonstrates the HTTP 402 Payment Required flow on the Tempo blockchain:

  1. Request a protected endpoint
  2. Receive 402 response with payment requirements
  3. Sign an EIP-712 payment authorization
  4. Retry with PAYMENT-SIGNATURE header
  5. Receive the paid response + settlement transaction

Quick start

npm install
npm run dev

Open http://localhost:3000

How it works

  • Demo Key mode (default): Uses a pre-funded testnet wallet. No setup required.
  • Browser Wallet mode: Connect MetaMask or any EIP-1193 wallet. Must have pathUSD on Tempo Moderato and have approved the facilitator.

Stack

  • Next.js 16
  • viem for EIP-712 signing
  • Tailwind CSS
  • Points at deployed Railway services

Chain