Menu

Explorer & Settings

Tempo Explorer Submit Project
Back to all projects

x402Lite-Payment-Widget

by x402lite · Updated 8 months ago

The x402Lite Payment Widget is a lightweight, open-source demo that lets developers embed micro-transaction payments into any website or app using the x402 Protocol (HTTP 402) and ERC-8004 payment standard. It enables instant, wallet-free payments (e.g., 0.01 USDC per request) for APIs, AI agents, or digital services.

In the AI payments ecosystem

x402Lite-Payment-Widget is an early-stage JavaScript project in the AI payments / x402 ecosystem. It currently has 0 GitHub stars and 0 forks.

README.md View on GitHub →

💳 x402Lite Payment Widget

Seamless Pay-Per-Use Payments (0.01 USDC) via x402 Protocol / ERC-8004

This open-source demo shows how to embed micro-transaction payments in any app or website using the x402 Protocol (HTTP 402 standard) and ERC-8004 payment schema.


🚀 Features

  • Simple pay-per-use button (0.01 USDC default)
  • Uses standard 402 Payment Required flow
  • Works with Coinbase CDP API or x402Lite endpoints
  • JSON response preview for easy integration
  • Minimal, responsive widget (HTML + JS + CSS)

🛠️ How to Use

  1. Clone the repo:
    git clone https://github.com/x402lite/x402Lite-Payment-Widget.git
    cd x402Lite-Payment-Widget
    
  2. Open index.html in your browser or deploy on Replit, Vercel, or any static host.
  3. Update the endpoint in script.js:
    const API_URL = "https://api.x402lite.com/x402";
    
  4. Click “Pay 0.01 USDC” — see a live 402 JSON response.
  5. Integrate this snippet into your dApp or agent UI.

⚡ Example Response

{
  "x402Version": 1,
  "resource": "https://api.x402lite.com/x402",
  "asset": "USDC",
  "amount": "0.01",
  "description": "Access premium feature",
  "status": "402 Payment Required"
}

🌐 Learn More


License

MIT License © 2025 x402Lite — Open Source for AI + Payments

All TypeScript projects →